摘要: 实验四 #include<stdio.h> int main() { int n=0; char ch[100]; FILE *fp; fp=fopen("data4.txt","r"); if(fp==NULL) { printf("fail to open file\n"); return 1; 阅读全文
posted @ 2023-06-12 17:07 听年 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 实验四 #include<stdio.h> #include<string.h> #define N 100 typedef struct { char num[100]; int s1; int s2; double sum; char level[10]; }STU; int fun(STU a 阅读全文
posted @ 2023-05-27 21:16 听年 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 task1_1.c #include <stdio.h> #define N 4 int main() { int x[N] = {1, 9, 8, 4}; int i; int *p; // 方式1:通过数组名和下标遍历输出数组元素 for (i = 0; i < N; ++i) pr 阅读全文
posted @ 2023-05-08 22:11 听年 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 task1_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 阅读全文
posted @ 2023-04-15 21:55 听年 阅读(4) 评论(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[]); // 函 阅读全文
posted @ 2023-04-05 14:22 听年 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #define N 5 5 #define R1 586 6 #define R2 701 7 int main() 8 { 9 int number; 10 阅读全文
posted @ 2023-03-18 16:26 听年 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 实验项目1 1 #include<stdio.h> 2 int main() 3 { 4 printf(" O\n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 printf(" O\n"); 8 printf("<H>\n"); 9 printf("I I\ 阅读全文
posted @ 2023-03-07 10:52 听年 阅读(30) 评论(0) 推荐(0) 编辑