摘要: 实验4 #include<stdio.h> int main() { FILE *fp; fp=fopen("d:\\data4.txt","r"); if(fp==NULL){ printf("fail to open file.\n"); return 1; } char ch; int cnt 阅读全文
posted @ 2023-12-21 10:31 天要下鱼吗 阅读(11) 评论(0) 推荐(0)
摘要: 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 sales_pric 阅读全文
posted @ 2023-12-17 15:33 天要下鱼吗 阅读(19) 评论(0) 推荐(0)
摘要: task1.1 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 *pmi 阅读全文
posted @ 2023-12-03 17:24 天要下鱼吗 阅读(9) 评论(0) 推荐(0)
摘要: 实验1源代码 1 #include<stdio.h> 2 #define N 4 3 4 void test1() 5 { 6 int a[N] = {1,9,8,4}; 7 int i; 8 9 printf("sizeof(a) = %d\n",sizeof(a)); 10 for(i=1;i< 阅读全文
posted @ 2023-11-18 19:59 天要下鱼吗 阅读(16) 评论(0) 推荐(0)
摘要: 实验1源代码 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(int line, int col, char te 阅读全文
posted @ 2023-11-05 12:02 天要下鱼吗 阅读(16) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 #define N1 374 7 #define N2 465 8 9 int main() 10 { 11 int number; 12 in 阅读全文
posted @ 2023-10-19 09:30 天要下鱼吗 阅读(21) 评论(0) 推荐(0)
摘要: 实验1-源代码 1 #include<stdio.h> 2 3 int main() 4 5 { 6 printf("o\n"); 7 printf("<H>\n"); 8 printf("I I\n"); 9 10 return 0; 11 } 实验1-执行结果 实验1.1源代码 1 #inclu 阅读全文
posted @ 2023-10-06 10:35 天要下鱼吗 阅读(28) 评论(0) 推荐(0)