摘要: /task.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 @ 2022-06-08 18:35 星咸 阅读(19) 评论(2) 推荐(0) 编辑
摘要: //task 1_1.c //将图书信息写入文本data1.txt #include<stdio.h> #define N 5 #define M 80 typedef struct { char name[M]; //书名 char author[M];//作者 }Book; int main() 阅读全文
posted @ 2022-06-05 15:44 星咸 阅读(17) 评论(2) 推荐(0) 编辑
摘要: //task1_1.c// #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",sizeo 阅读全文
posted @ 2022-05-04 15:39 星咸 阅读(20) 评论(2) 推荐(0) 编辑
摘要: //task1.c// #include<stdio.h> #include<stdlib.h> #include<time.h> #include<windows.h> #define N 80 void printText(int line,int co1,char text[]); //函数声 阅读全文
posted @ 2022-04-19 20:30 星咸 阅读(47) 评论(2) 推荐(0) 编辑
摘要: //task1.c// #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;++i) { 阅读全文
posted @ 2022-04-14 10:55 星咸 阅读(33) 评论(2) 推荐(0) 编辑
摘要: //task1_1//#include<stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf(" \n"); printf(" O \n"); printf("<H>\n"); printf(" 阅读全文
posted @ 2022-03-24 20:57 星咸 阅读(31) 评论(2) 推荐(1) 编辑