摘要: 任务4 #include<stdio.h> #include<string.h> int main(){ FILE *fp; int lines=0,count=0; char ch; fp = fopen("data4.txt", "r"); // 如果打开文件失败,输出提示信息并返回 if(fp 阅读全文
posted @ 2025-12-29 19:14 邹秉祥 阅读(8) 评论(0) 推荐(0)
摘要: 任务1 任务2 任务3 任务4 #include <stdio.h> #include <string.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 阅读全文
posted @ 2025-12-25 09:51 邹秉祥 阅读(9) 评论(1) 推荐(0)
摘要: 任务1 task1 1功能是将数组最小值的地址赋值给pmin,最大值的地址赋值给pmax. 2 都指向的是数组第一个数 task2 1功能是寻找数组中最大的数,返回的是输入的数据里面最大的数字 2不可以,return的是一个指针变量,这里应该返回的是指针变量所指的地址中的数字 任务2 task1 1 阅读全文
posted @ 2025-12-11 12:06 邹秉祥 阅读(7) 评论(1) 推荐(0)
摘要: 实验四 任务1. 1.不连续,相同 2.不连续,相同,相差16,数组中第一个数和第二个数相差16 任务2. 形参为int x[i]和int n,实参为n和x input作用为依次输入数组x[i],compute作用为去除一个最大和最小值剩下数的平均值 任务3. 形参为int x[][N]和int n 阅读全文
posted @ 2025-11-16 17:47 邹秉祥 阅读(7) 评论(1) 推荐(0)
摘要: 实验任务1. 1. score_to_grade功能为将输入的得分转化为ABCDE四个等级 形参:整数类型 返回值:字符类型 2.没有break中止单个case里面的内容;ABCDE不应该用双引号而是单引号 实验任务2. 1.功能为将输入的数字翻转过来,如123反转成321 2.可以 方案1中直接除 阅读全文
posted @ 2025-10-27 22:03 邹秉祥 阅读(9) 评论(1) 推荐(0)
摘要: 任务1:1.除去后第一次生成随机学号,当再次运行程序则生成与第一次一样的学号。2.作用为在当前程序重新随机生成学号。 任务2:没有影响 语义为重新运行循环中的程序。 任务3: #include <stdio.h> int main() { char color; while(1) { printf( 阅读全文
posted @ 2025-10-16 22:44 邹秉祥 阅读(8) 评论(1) 推荐(0)
摘要: https://www.cnblogs.com/5181-1841 阅读全文
posted @ 2025-10-07 14:23 邹秉祥 阅读(6) 评论(0) 推荐(0)
摘要: #include #include int main() { printf(" o \n"); printf("\n"); printf("I I\n"); printf(" o \n"); printf("\n"); printf("I I\n"); system("pause"); return 阅读全文
posted @ 2025-10-07 14:16 邹秉祥 阅读(12) 评论(1) 推荐(0)