摘要: task4 点击查看代码 #include<stdio.h> int main(){ FILE *fp; int sum=0; char ch; fp=fopen("data4.txt","r"); if(fp==NULL){ printf("不能打开文件\n"); return 1; } ch=f 阅读全文
posted @ 2024-06-18 17:32 乄北 阅读(25) 评论(0) 推荐(0)
摘要: task4 点击查看代码 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; 阅读全文
posted @ 2024-06-09 22:09 乄北 阅读(30) 评论(0) 推荐(0)
摘要: task1-1: 点击查看代码 #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pmin, i 阅读全文
posted @ 2024-05-26 20:09 乄北 阅读(14) 评论(0) 推荐(0)
摘要: task1-1 点击查看代码 #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a)); / 阅读全文
posted @ 2024-05-19 21:01 乄北 阅读(19) 评论(0) 推荐(0)
摘要: tsak1 点击查看代码 #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 @ 2024-04-28 20:40 乄北 阅读(14) 评论(0) 推荐(0)
摘要: task1.c 点击查看代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand( time(0) ); for(i = 0; i < N 阅读全文
posted @ 2024-04-14 20:57 乄北 阅读(8) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<stdio.h> int main(){ printf(" 0\n"); printf("<H>\n"); printf("I I\n"); printf(" 0\n"); printf("<H>\n"); printf("I I\n"); system("pause 阅读全文
posted @ 2024-03-17 22:32 乄北 阅读(20) 评论(0) 推荐(0)