摘要: task1_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", x[ 阅读全文
posted @ 2022-06-14 00:50 易千瓦 阅读(15) 评论(0) 推荐(0)
摘要: task1_1.c #include <stdio.h> #define N 5 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 }Book; int main() { Book x[N]={ {"一九八 阅读全文
posted @ 2022-06-06 18:01 易千瓦 阅读(19) 评论(0) 推荐(0)
摘要: 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\n",sizeof(int) 阅读全文
posted @ 2022-05-09 16:42 易千瓦 阅读(17) 评论(0) 推荐(0)
摘要: 实验任务1、 #include<stdio.h> #include<stdlib.h> #include<time.h> #include<windows.h> #define N 80 void printText(int line,int co1,char text[]); //函数声明 voi 阅读全文
posted @ 2022-04-24 11:18 易千瓦 阅读(41) 评论(0) 推荐(0)
摘要: //该程序随机生成在校生中5位同学学号 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int grade, number; int i; srand(time(0)); for(i= 阅读全文
posted @ 2022-04-17 18:48 易千瓦 阅读(43) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf("\n"); printf(" O \n"); printf("<H>\n"); printf("I I\n"); ret 阅读全文
posted @ 2022-03-27 21:14 易千瓦 阅读(42) 评论(0) 推荐(0)