摘要: task4.c #include <stdio.h> int main() { char ch; int cnt=0; FILE *fp; fp=fopen("data4.txt","r"); if(fp==NULL){ printf("fail to open\n"); return 1; } w 阅读全文
posted @ 2023-12-17 12:44 明耀66 阅读(22) 评论(0) 推荐(0)
摘要: task4.c 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[80]; // 作者 8 double sa 阅读全文
posted @ 2023-12-12 09:19 明耀66 阅读(24) 评论(0) 推荐(0)
摘要: task1_1.c源码 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int 阅读全文
posted @ 2023-11-27 17:28 明耀66 阅读(15) 评论(0) 推荐(0)
摘要: task1_1.c代码 1 #include <stdio.h> 2 #define N 4 3 4 void test1() { 5 int a[N] = {1, 9, 8, 4}; 6 int i; 7 8 // 输出数组a占用的内存字节数 9 printf("sizeof(a) = %d\n" 阅读全文
posted @ 2023-11-13 20:51 明耀66 阅读(18) 评论(0) 推荐(0)
摘要: task1.c 实现功能:延迟打印,以实现游戏运行的效果 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 7 void print_text( 阅读全文
posted @ 2023-10-30 17:22 明耀66 阅读(23) 评论(0) 推荐(0)
摘要: task.1源代码: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include <time.h> 4 #define N 5 5 #define N1 374 6 #define N2 465 7 int main() 8 { 9 int number; 阅读全文
posted @ 2023-10-16 21:10 明耀66 阅读(17) 评论(0) 推荐(0)
摘要: task1.c代码 1 #include <stdio.h> 2 int main() 3 { 4 printf(" O \n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 return 0; 8 } task1.c运行截图 task1-1.c代码 1 #in 阅读全文
posted @ 2023-09-30 14:02 明耀66 阅读(82) 评论(0) 推荐(0)