摘要: Test1 1 #include<stdio.h> 2 #define N 4 3 #define M 2 4 void test1(){ 5 int x[N]={1,9,8,4}; 6 int i; 7 printf("sizeof(x)=%d\n",sizeof(x)); 8 for(i=0;i 阅读全文
posted @ 2025-11-14 16:05 wsh12345 阅读(12) 评论(1) 推荐(0)
摘要: 实验结论 实验任务1 源代码 1 #include <stdio.h> 2 char score_to_grade(int score); 3 int main(){ 4 int score; 5 char grade; 6 while(scanf("%d",&score)!=EOF){ 7 gra 阅读全文
posted @ 2025-10-24 22:11 wsh12345 阅读(8) 评论(1) 推荐(0)
摘要: 实验结论 实验任务1 源代码 1 int main(){ 2 int cnt; 3 int random_major,random_no; 4 srand(time(NULL)); 5 cnt =0; 6 while(cnt<N){ 7 random_major =rand()%2; 8 if(ra 阅读全文
posted @ 2025-10-14 20:27 wsh12345 阅读(10) 评论(1) 推荐(0)
摘要: 实验结论 实验任务1 task1_1.c 源代码 1 #include<stdio.h> 2 int main() 3 { printf(" o \n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 printf(" o \n"); 8 printf("<H>\ 阅读全文
posted @ 2025-09-27 11:27 wsh12345 阅读(54) 评论(1) 推荐(0)