摘要: 任务一 #include<stdio.h> #define N 7 #define M 80 typedef struct { char name[M]; //书名 char author[M]; //作者 }BOOK; int main() { BOOK x[N] = {{"《雕塑家》","斯科特 阅读全文
posted @ 2023-06-10 22:33 根本抢不到名字 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 任务一 #include <stdio.h> #include <string.h> #define N 3 typedef struct student { int id; char name[20]; char subject[20]; double perf; double mid; doub 阅读全文
posted @ 2023-05-26 21:50 根本抢不到名字 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 任务一 1.1 #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" 阅读全文
posted @ 2023-05-08 16:03 根本抢不到名字 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 实验任务一 1.1 #include<stdio.h> #define N 4 int main(){ int a[N] = {2,0,2,3}; char b[N] = {'2','0','2','3'}; int i; printf("sizeof(int) = %d\n",sizeof(int 阅读全文
posted @ 2023-04-16 13:51 根本抢不到名字 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 任务1 #include<stdio.h> #include<stdlib.h> #include<time.h> #include<windows.h> #define N 80 void print_text(int line,int col,char text[]); void print_s 阅读全文
posted @ 2023-04-02 18:13 根本抢不到名字 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 实验任务一 1:随机生成一个586和701之间的数字 2: 随机生成五个最后四位在586和701之间的数字 实验任务二 #include<stdio.h> int main() { double x,y; char c1,c2,c3; int a1,a2,a3; scanf("%d%d%d",&a1 阅读全文
posted @ 2023-03-19 13:31 根本抢不到名字 阅读(3) 评论(0) 推荐(0) 编辑
摘要: task1 task2 #include <stdio.h> int main() { int n, sum; scanf_s("%d", &n); int i = 1; sum = 0; while (i <= n) { sum = sum + i; i++; } printf("sum=%d\n 阅读全文
posted @ 2023-03-04 21:05 根本抢不到名字 阅读(5) 评论(0) 推荐(0) 编辑