摘要: 实验任务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 c 阅读全文
posted @ 2023-12-21 15:58 黄瓜不瓜 阅读(31) 评论(0) 推荐(0)
摘要: 实验任务4: #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 阅读全文
posted @ 2023-12-18 00:37 黄瓜不瓜 阅读(48) 评论(0) 推荐(0)
摘要: 实验任务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, int *pmax) 阅读全文
posted @ 2023-12-04 00:03 黄瓜不瓜 阅读(28) 评论(0) 推荐(0)
摘要: 实验任务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)); // 输出int类 阅读全文
posted @ 2023-11-18 15:12 黄瓜不瓜 阅读(31) 评论(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[]); void prin 阅读全文
posted @ 2023-11-05 15:08 黄瓜不瓜 阅读(19) 评论(0) 推荐(0)
摘要: 实验任务1 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 #define N1 374 #define N2 465 int main() { int number; int i; srand(time(0)); 阅读全文
posted @ 2023-10-21 20:37 黄瓜不瓜 阅读(22) 评论(0) 推荐(0)
摘要: 实验任务1 task1_1.c #include<stdio.h> int main() { printf("o\n"); printf("<H>\n"); printf("I I\n"); printf(" o\n"); printf("<H>\n"); printf("I I\n");retur 阅读全文
posted @ 2023-10-06 22:07 黄瓜不瓜 阅读(31) 评论(0) 推荐(0)