摘要: 实验任务4 task4.c `#include <stdio.h> define N 80 include <string.h> void read(); int main() { printf("data4.txt统计结果:\n"); read(); return 0; } void read() 阅读全文
posted @ 2025-06-06 18:38 汪天昊 阅读(20) 评论(0) 推荐(0)
摘要: 实验任务4 task4.c `#include <stdio.h> define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; 阅读全文
posted @ 2025-06-01 18:42 汪天昊 阅读(15) 评论(0) 推荐(0)
摘要: 实验任务1.1 task1.1.c `#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, 阅读全文
posted @ 2025-05-14 22:12 汪天昊 阅读(98) 评论(0) 推荐(0)
摘要: 实验任务1 程序编码 task1.c `#include <stdio.h> define N 4 define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; // 输出数组x占用的内存字节数 printf("sizeof(x) = %d\n" 阅读全文
posted @ 2025-04-16 20:16 汪天昊 阅读(13) 评论(0) 推荐(0)
摘要: 实验任务1 task1.c 代码: `#include <stdio.h> char score_to_grade(int score); int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = 阅读全文
posted @ 2025-04-04 15:52 汪天昊 阅读(22) 评论(0) 推荐(0)
摘要: TEST1 代码: ` 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 阅读全文
posted @ 2025-03-18 23:27 汪天昊 阅读(24) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/wth2006 阅读全文
posted @ 2025-03-14 14:41 汪天昊 阅读(20) 评论(1) 推荐(0)
摘要: 一、实验目的 会使用C语言程序开发环境(vs2010/devc++等),能熟练、正确使用它们编写、编译、运行、调试C程序 知道C程序结构和编码规范,能正确使用 能正确、熟练使用C语言输入输出函数: scanf() , printf() , getchar() , putchar() 能灵活、组合使用 阅读全文
posted @ 2025-03-05 16:20 汪天昊 阅读(16) 评论(0) 推荐(0)