摘要: 任务4: 代码: #include <stdio.h> int main() { int size=0; char sum; FILE *fp; fp = fopen("data4.txt", "r"); if(fp == NULL) { printf("fail to open file\n"); 阅读全文
posted @ 2023-06-09 11:08 15278883663 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 任务4: 代码: #include <stdio.h> #include<string.h> #define N 100 typedef struct { char num[10]; int s1; int s2; double sum; char level[10]; } STU; int fun 阅读全文
posted @ 2023-05-25 17:16 15278883663 阅读(9) 评论(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-06 20:54 15278883663 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 任务1: 代码1: #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(int)); p 阅读全文
posted @ 2023-04-14 21:29 15278883663 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 任务1: 代码: #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int line,int col,char text[]); voi 阅读全文
posted @ 2023-03-31 11:45 15278883663 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 实验二 任务1: 代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define R1 586 #define R2 701 int main() { int number,i; srand( time( 阅读全文
posted @ 2023-03-17 11:39 15278883663 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 代码 1 #include <stdio.h> 2 int main() 3 { 4 printf(" o o\n" ); 5 printf("<H> <H>\n"); 6 printf("I I I I\n"); 7 8 return 0; 9 } #include <stdio.h> 阅读全文
posted @ 2023-03-03 11:21 15278883663 阅读(12) 评论(0) 推荐(0) 编辑