摘要: task1 //task1 #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("% 阅读全文
posted @ 2022-06-14 00:17 阁下- 阅读(14) 评论(1) 推荐(0) 编辑
摘要: task1_1 //task1_1 // 将图书信息写入文本文件data1.txt #include <stdio.h> #define N 5 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 }Book 阅读全文
posted @ 2022-06-06 23:06 阁下- 阅读(26) 评论(2) 推荐(0) 编辑
摘要: 实验任务1 //task1_1 #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 阅读全文
posted @ 2022-05-09 23:53 阁下- 阅读(20) 评论(2) 推荐(0) 编辑
摘要: 实验任务1 //3task1 #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-26 11:15 阁下- 阅读(26) 评论(2) 推荐(0) 编辑
摘要: 实验任务1 //task1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int grade, number; int i; srand(time(0)); for(i=0; i<N 阅读全文
posted @ 2022-04-18 20:06 阁下- 阅读(37) 评论(3) 推荐(0) 编辑
摘要: //打印一个字符小人 #include<stdio.h> int main() { printf(" o\n"); printf("<H>\n"); printf("I I\n"); return 0; } //打印两个字符小人 #include<stdio.h> int main() { prin 阅读全文
posted @ 2022-03-28 22:30 阁下- 阅读(53) 评论(4) 推荐(0) 编辑