摘要: 实验1 点击查看代码 // 将图书信息写入文本文件data1.txt // 再从文件中读取图书信息,打印输出到屏幕上,并显示行号 #include <stdio.h> #define N 80 #define M 100 typedef struct { char name[N]; // 书名 ch 阅读全文
posted @ 2024-06-18 11:28 高羽宏 阅读(28) 评论(0) 推荐(0)
摘要: 实验1 点击查看代码 // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 10 // 运行程序输入测试时,可 阅读全文
posted @ 2024-06-06 22:10 高羽宏 阅读(24) 评论(0) 推荐(0)
摘要: 实验1 1.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, in 阅读全文
posted @ 2024-05-26 22:53 高羽宏 阅读(25) 评论(0) 推荐(0)
摘要: 实验1 1.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-18 13:00 高羽宏 阅读(17) 评论(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 @ 2024-04-27 15:46 高羽宏 阅读(61) 评论(0) 推荐(0)
摘要: 点击查看代码 #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;++i){ number=rand 阅读全文
posted @ 2024-04-13 22:03 高羽宏 阅读(12) 评论(0) 推荐(0)
摘要: task1 点击查看代码 #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"); syste 阅读全文
posted @ 2024-03-12 23:12 高羽宏 阅读(18) 评论(0) 推荐(0)