摘要: // 将图书信息写入文本文件data1.txt #include <stdio.h> #define N 7 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 } Book; int main() { Bo 阅读全文
posted @ 2023-06-15 11:09 orangeove 阅读(8) 评论(0) 推荐(0)
摘要: 实验任务1 // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 10 // 运行程序输入测试时,可以把这个数 阅读全文
posted @ 2023-06-01 13:31 orangeove 阅读(21) 评论(0) 推荐(0)
摘要: 试验任务1 1 #include <stdio.h> #define N 4 int main() { int x[N] = {1, 9, 8, 4}; int i; int *p; // 方式1:通过数组名和下标遍历输出数组元素 for (i = 0; i < N; ++i) printf("%d 阅读全文
posted @ 2023-05-11 12:55 orangeove 阅读(16) 评论(0) 推荐(0)
摘要: 实验任务1.1#include <stdio.h> #define N 4 int main() { int a[N] = {2, 0, 2, 3}; char b[N] = {'2', '0', '2', '3'}; int i; printf("sizeof(int) = %d\n", size 阅读全文
posted @ 2023-04-20 13:42 orangeove 阅读(8) 评论(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[]); // 函数 阅读全文
posted @ 2023-04-06 12:48 orangeove 阅读(17) 评论(0) 推荐(0)
摘要: 实验任务1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define R1 586 #define R2 701 int main() { int number; int i; srand( time(0 阅读全文
posted @ 2023-03-23 09:32 orangeove 阅读(30) 评论(0) 推荐(0)
摘要: 实验任务1 //打印小人 #include <stdio.h> #include <stdlib.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); system("pause"); return 0; } #incl 阅读全文
posted @ 2023-03-09 09:39 orangeove 阅读(20) 评论(0) 推荐(0)