摘要: 实验四: #include <stdio.h> #include <stdlib.h> int main(void){ FILE *fp; char ch; int sum=0, other=0; if((fp=fopen("data4.txt","r"))==NULL){ printf("File 阅读全文
posted @ 2023-06-15 09:44 陈宇潇 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 实验一: #include <stdio.h> #include <string.h> #define N 3 typedef struct student { int id; char name[20]; char subject[20]; double perf; double mid; dou 阅读全文
posted @ 2023-05-30 11:48 陈宇潇 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 实验1.1: #include <stdio.h> #define N 4 int main() { int x[N] = {1,9,8,4}; int i; int *p; for(i=0;i<N;++i) printf("%d",x[i]); printf("\n"); return 0; } 阅读全文
posted @ 2023-05-10 18:40 陈宇潇 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 实验一: #include<stdio.h> #define N 4 int main() { int a[N] = {2, 0, 2, 3}; char b[N] = {'2', '0', '2', '3'}; int i; printf("sizeof(int) = %d\n",sizeof(i 阅读全文
posted @ 2023-04-18 10:37 陈宇潇 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 实验一: #include <stdio.h> #include <stdlib.h> 源代码: #include <time.h> #include <windows.h> #define N 80 void print_text(int line, int col, char text[]); 阅读全文
posted @ 2023-04-05 16:11 陈宇潇 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 实验一: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define R1 586 #define R2 701 int main() { int number; int i; srand( time(0) 阅读全文
posted @ 2023-03-18 10:11 陈宇潇 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 实验一: 源代码: //打印一个小人 #include <stdio.h>int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); return 0; } #include <stdio.h> int main() { print 阅读全文
posted @ 2023-03-03 18:18 陈宇潇 阅读(15) 评论(0) 推荐(0) 编辑