摘要: 4.task4 1 #include <stdio.h> 2 3 int main() { 4 char ch; 5 int k=0; 6 FILE *fp; 7 8 fp = fopen("data4.txt", "r"); 9 if(fp == NULL) { 10 printf("fail t 阅读全文
posted @ 2023-06-09 18:04 202113020120张艳 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1.task4 1 //finish ! 2 #include <stdio.h> 3 #include<string.h> 4 #include<stdlib.h> 5 #define N 100 6 7 typedef struct { 8 char num[10]; // 学号 9 int s 阅读全文
posted @ 2023-05-27 21:12 202113020120张艳 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 1.task1 task1_1.c 1 #include<stdio.h> 2 #define N 4 3 int main() 4 { 5 int x[N]={1,9,8,4}; 6 int i; 7 int *p; 8 9 //方式1:通过数组名和下标遍历输出数组元素 10 for(i=0;i< 阅读全文
posted @ 2023-05-07 23:41 202113020120张艳 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 1.task1 task1_1.c 1 #include<stdio.h> 2 #define N 4 3 int main() 4 { 5 int a[N]={2,0,2,3}; 6 char b[N]={'2','0','2','3'}; 7 int i; 8 printf("sizeof(in 阅读全文
posted @ 2023-04-15 19:52 202113020120张艳 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1.实验任务1 task1.c 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 #include<windows.h> 5 #define N 80 6 7 void print_text(int line,int col, 阅读全文
posted @ 2023-04-01 13:35 202113020120张艳 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 1.task1 task1.c 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 #define R1 586 7 #define R2 701 8 9 int main() 10 { 11 i 阅读全文
posted @ 2023-03-17 16:10 202113020120张艳 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 1.实验1 task1_1 1 //打印一个字符小人 2 #include <stdio.h> 3 int main() 4 { 5 printf(" o \n"); 6 printf("<H>\n"); 7 printf("I I\n"); 8 return 0; 9 10 } 实验1 task1 阅读全文
posted @ 2023-03-02 18:19 202113020120张艳 阅读(110) 评论(1) 推荐(0) 编辑