摘要: 实验任务1 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 // 输出数组x占用的内存字节数 8 printf("sizeof(x) = % 阅读全文
posted @ 2025-11-16 12:50 沈春玲 阅读(5) 评论(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 阅读全文
posted @ 2025-10-28 12:41 沈春玲 阅读(5) 评论(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 ran 阅读全文
posted @ 2025-10-16 10:56 沈春玲 阅读(15) 评论(1) 推荐(0)
摘要: 试验任务1.1 1 // 打印一个字符小人 2 #include <stdio.h> 3 #include<stdlib.h> 4 int main() 5 { 6 //第一个字符小人 7 printf(" O \n"); 8 printf("<H>\n"); 9 printf("I I\n"); 阅读全文
posted @ 2025-09-28 11:21 沈春玲 阅读(13) 评论(1) 推荐(0)