摘要: 实验1.1 #include <stdio.h> #define N 7 #define M 80 typedef struct { char name[M]; char author[M]; } Book; int main() { Book x[N] = { {"《雕塑家》", "斯科特.麦克劳 阅读全文
posted @ 2022-12-28 19:36 李程远 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #include <stdio.h> #include<string.h> #define N 100 typedef struct { char num[10]; // 学号 int s1; // 期末成绩 int s2; // 平时成绩 double sum; // 总评 char 阅读全文
posted @ 2022-12-23 16:57 李程远 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 实践任务1.1 #include<stdio.h> #define N 4 int main() { int a[N]={1,9,8,4}; char b[N]={'1','9','8','4'}; int i; printf("sizeof(int)=%d\n",sizeof(int)); pri 阅读全文
posted @ 2022-11-27 17:13 李程远 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 实践任务1#include<stdio.h> #include<stdlib.h> #include<time.h> #define N 80 void print_text(int line,int col,char text[]); void print_spaces(int n); void 阅读全文
posted @ 2022-11-06 11:51 李程远 阅读(15) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 int main() { int number; int i; srand(time(0)); for(i=0;i<N;++i) { number=rand()%500 阅读全文
posted @ 2022-10-23 21:22 李程远 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 实践任务1 1 #include<stdio.h> int main() { printf(" o o \n"); printf("<H> <H>\n"); printf("I I I I\n"); return 0; } 2 #include<stdio.h> int main() { print 阅读全文
posted @ 2022-10-16 12:44 李程远 阅读(27) 评论(0) 推荐(0) 编辑