摘要: 实验1 问题1:功能:接收一个整数类型的考试分数,将其转换成对应的等级字符(A、B、C、D、E) 形参类型:int(整型),参数名为 score 返回值类型:char(字符型),返回变量 ans 问题2:缺少 break 语句导致“穿透” 数据类型错误(双引号表示字符串) 实验2 问题1:功能: 计 阅读全文
posted @ 2026-11-19 21:19 沉默的日夕 阅读(10) 评论(1) 推荐(0)
摘要: #任务1 ##源代码 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 100 #define CNT 5 int main(){ int number; int i; srand(time(0)); for(i=0;i< 阅读全文
posted @ 2026-11-03 22:15 沉默的日夕 阅读(12) 评论(1) 推荐(0)
摘要: 任务1 源代码 #include<stdio.h> int main() { printf("o\n"); printf("<H>\n"): printf("II\n"); return 0; } #任务2 ##源代码 ```c #include <stdio.h> int main() { dou 阅读全文
posted @ 2026-10-18 23:57 沉默的日夕 阅读(9) 评论(1) 推荐(0)