摘要: 任务一 源代码 ` include <stdio.h> define N 4 define M 2 void test1 (){ int x[N]={1,9,8,4}; int i; printf("sizeof(x)=%d\n",sizeof(x)); for (i=0;i<N;++i) prin 阅读全文
posted @ 2025-11-17 09:39 梁宜萱 阅读(6) 评论(1) 推荐(0)
摘要: 任务1 问题: 功能:判断分数对应的等级;形参:整形;返回值:字符型 每一行后面没有加break,会导致后面的字母都显示出来 源代码: `#include <stdio.h> char score_to_grade(int score); int main (){ int score; char g 阅读全文
posted @ 2025-10-31 02:26 梁宜萱 阅读(6) 评论(1) 推荐(0)
摘要: 任务1 源代码 `#include <stdio.h> include <stdlib.h> include <time.h> define N 5 define N1 80 define N2 35 int main (){ int cnt; int random_major,random_no; 阅读全文
posted @ 2025-10-19 10:19 梁宜萱 阅读(7) 评论(1) 推荐(0)
摘要: 实验任务1 task1_1 `#include <stdio.h> int main() { printf(" o o \n"); printf(" \n"); printf("I I I I\n"); return 0; } ` 运行结果 task1_2 `#include <stdio.h> i 阅读全文
posted @ 2025-10-09 20:03 梁宜萱 阅读(8) 评论(1) 推荐(0)