摘要: 1 #include <stdio.h> 2 #define N 4 3 4 int main() 5 { 6 int x[N] = {1, 9, 8, 4}; 7 int i; 8 int *p; 9 10 // 方式1:通过数组名和下标遍历输出数组元素 11 for(i=0; i<N; ++i) 阅读全文
posted @ 2022-06-13 21:46 映月三花 阅读(15) 评论(2) 推荐(0) 编辑
摘要: task1-1 1 #include <stdio.h> 2 #define N 5 3 #define M 80 4 typedef struct 5 { 6 char name[M]; 7 char author[M]; 8 }Book; 9 int main() 10 { 11 Book x[ 阅读全文
posted @ 2022-06-06 21:54 映月三花 阅读(13) 评论(2) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 #define N 4 3 4 int main() 5 { 6 int a[N]={2,0,2,2}; 7 char b[N]={'2','0','2','2'}; 8 int i; 9 10 printf("sizeof(int) = %d\n",si 阅读全文
posted @ 2022-05-09 22:05 映月三花 阅读(6) 评论(1) 推荐(0) 编辑
摘要: 1 #define N 80 2 3 void printText(int Line, int col, char text[]); 4 void printSpaces(int n); 5 void printBlankLines(int n); 6 7 int main() 8 { 9 int 阅读全文
posted @ 2022-04-25 19:40 映月三花 阅读(10) 评论(2) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 7 int main() /*随机选取 5个2018届~2021届的学生学号*/ 8 { 9 int grade, number; 10 int 阅读全文
posted @ 2022-04-19 09:01 映月三花 阅读(6) 评论(2) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 3 int main() 4 { 5 printf(" O O \n"); 6 printf("<H> <H>\n"); 7 printf("I I I I\n"); 8 9 return 0; 10 } #include<stdio.h> int mai 阅读全文
posted @ 2022-03-28 15:00 映月三花 阅读(21) 评论(2) 推荐(0) 编辑