摘要: 任务一 1:是。相同。 2:是。相同。差16,含义是第一行的总字节数。 1 #include<stdio.h> 2 #define N 100 3 4 void input(int x[],int n); 5 double compute(int x[],int n); 6 7 int main() 阅读全文
posted @ 2025-11-13 21:02 郭语涵 阅读(14) 评论(1) 推荐(0)
摘要: 任务1 Q1将百分制的成绩转化为字母等级。 Q2形参类型int整形;返回值类型char字符型。没有break,不会跳出循环;输出的为单个字符,应该用单引号。 任务2 Q1将各数位上的数相加求和,赋值给ans。 Q2可以。该段代码利用了递归,n<10各数位上的数之和即为n,n>=10反复用sum di 阅读全文
posted @ 2025-10-25 17:21 郭语涵 阅读(12) 评论(1) 推荐(0)
摘要: 任务1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #define N 5 5 #define N1 80 6 #define N2 35 7 int main() { 8 int cnt; 9 int rando 阅读全文
posted @ 2025-10-18 10:35 郭语涵 阅读(8) 评论(1) 推荐(0)
摘要: 任务1 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop * 阅读全文
posted @ 2025-10-09 11:20 郭语涵 阅读(15) 评论(1) 推荐(0)