摘要: task1.1 1 #include <stdio.h> 2 #define N 4 3 4 int main() 5 { 6 int x[N] = {1, 9, 8, 4}; 7 int i; 8 int *p; 9 10 // 方式1:通过数组名和下标遍历输出数组元素 11 for(i=0; i 阅读全文
posted @ 2022-06-14 00:39 19度的小常 阅读(2) 评论(2) 推荐(0) 编辑
摘要: task1-1 1 typedef struct 2 { 3 char name[M]; // 书名 4 char author[M]; // 作者 5 }Book; 6 int main() 7 { 8 Book x[N] = { {"一九八四", "乔治.奥威尔"}, 9 {"美丽新世界", " 阅读全文
posted @ 2022-06-06 23:04 19度的小常 阅读(7) 评论(3) 推荐(0) 编辑
摘要: task1.1 1 #include<stdio.h> 2 #define N 4 3 4 int main() 5 { 6 int a[N]={2,0,2,2}; 7 char b[N]={'2','0','2','2'}; 8 int i; 9 10 printf("sizeof(int)=%d 阅读全文
posted @ 2022-05-09 00:04 19度的小常 阅读(11) 评论(2) 推荐(0) 编辑
摘要: task.1 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 #include<windows.h> 5 #define N 80 6 7 void printText(int line,int col,char text[ 阅读全文
posted @ 2022-04-24 17:04 19度的小常 阅读(21) 评论(2) 推荐(0) 编辑
摘要: *实验任务1 task1.c 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 7 int main() 8 { 9 int grade ,number; 10 int i; 11 12 sra 阅读全文
posted @ 2022-04-16 15:11 19度的小常 阅读(20) 评论(2) 推荐(0) 编辑
摘要: 打印字符小人 //task1_1.c #include<stdio.h> int main () { printf(" o \n"); printf("<H>\n"); printf("I I\n"); printf(" \n"); printf(" o \n"); printf("<H>\n"); 阅读全文
posted @ 2022-03-28 18:48 19度的小常 阅读(27) 评论(6) 推荐(0) 编辑