摘要: #include <stdio.h> #define N 4 int main() { int x[N] = {1, 9, 8, 4}; int i; int *p; // 方式1:通过数组名和下标遍历输出数组元素 for(i=0; i<N; ++i) printf("%d", x[i]); pri 阅读全文
posted @ 2022-06-11 20:34 wen_zhang 阅读(21) 评论(0) 推荐(0)
摘要: // 将图书信息写入文本文件data1.txt #include <stdio.h> #define N 5 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 }Book; int main() { Boo 阅读全文
posted @ 2022-06-06 19:39 wen_zhang 阅读(40) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define N 4 int main() { int a[N] = {2, 0, 2, 2}; char b[N] = {'2', '0', '2', '2'}; int i; printf("sizeof(int) = %d\n", sizeof(int) 阅读全文
posted @ 2022-05-08 16:46 wen_zhang 阅读(30) 评论(0) 推荐(0)
摘要: task1 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void printText(int line, int col, char text[]); // 函数 阅读全文
posted @ 2022-04-21 21:01 wen_zhang 阅读(68) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 /*随机产生5组特定学院(貌似是龙山的)的本科生学号*/ int main() { int grate,number; int i; srand(time(0)) ; 阅读全文
posted @ 2022-04-17 16:21 wen_zhang 阅读(45) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int n,i; i=1; scanf("%d",&n); while(i<=n) { printf(" 0 \n"); printf("<0>\n"); printf("I I\n"); i++; } return 0; } View 阅读全文
posted @ 2022-03-25 08:56 wen_zhang 阅读(60) 评论(2) 推荐(0)