摘要: task4 1 #include<stdio.h> 2 int main(){ 3 FILE *fp; 4 fp=fopen("data4.txt","r"); 5 if(fp==NULL){ 6 return 0; 7 } 8 int line=1,number=0; 9 char c; 10 c 阅读全文
posted @ 2024-12-30 00:56 2024- 阅读(13) 评论(0) 推荐(0)
摘要: text 4 1 #include <stdio.h> 2 #define N 10 3 typedef struct { 4 char isbn[20]; // isbn号 5 char name[80]; // 书名 6 char author[80]; // 作者 7 double sales 阅读全文
posted @ 2024-12-22 23:48 2024- 阅读(16) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #define N 5 3 void input(int x[], int n); 4 void output(int x[], int n); 5 void find_min_max(int x[], int n, int *pmin, int *pm 阅读全文
posted @ 2024-12-08 23:57 2024- 阅读(16) 评论(0) 推荐(0)
摘要: test1 1 #include <stdio.h> 2 #define N 4 3 #define M 2 4 void test1() { 5 int x[N] = {1, 9, 8, 4}; 6 int i; 7 // 输出数组x占用的内存字节数 8 printf("sizeof(x) = % 阅读全文
posted @ 2024-11-10 22:12 2024- 阅读(36) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 char score_to_grade(int score); 3 int main(){ 4 int score; 5 char grade; 6 while(scanf("%d",&score)!=EOF){ 7 grade=score_to_gra 阅读全文
posted @ 2024-10-26 00:25 2024- 阅读(41) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<math.h> 3 int main() { 4 double a, b, c; 5 double delta, p1, p2; 6 while(scanf("%lf%lf%lf", &a, &b, &c) != EOF) { 7 if( 阅读全文
posted @ 2024-10-15 00:43 2024- 阅读(30) 评论(0) 推荐(0)