摘要: task4.c 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #define N 100 5 int main() 6 { 7 char s; 8 int i=0; 9 FILE *fp; 10 11 fp=fo 阅读全文
posted @ 2023-06-08 20:09 shaobky 阅读(11) 评论(0) 推荐(0) 编辑
摘要: task1.c 1 // P286例8.17 2 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 3 // 打印不及格学生信息和所有学生信息程分别调用 4 5 #include <stdio.h> 6 #include <string.h> 7 #define N 3 // 运 阅读全文
posted @ 2023-05-28 10:32 shaobky 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 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 // 方式1:通过数组名和下标遍历输出数组元素 9 for (i = 0; 阅读全文
posted @ 2023-05-04 22:05 shaobky 阅读(13) 评论(0) 推荐(0) 编辑
摘要: task1_1.c 1 #include <stdio.h> 2 #define N 4 3 4 int main() { 5 int a[N] = { 2, 0, 2, 3 }; 6 char b[N] = { '2', '0', '2', '3' }; 7 int i; 8 9 printf(" 阅读全文
posted @ 2023-04-14 23:34 shaobky 阅读(17) 评论(0) 推荐(0) 编辑
摘要: task1.c 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 void print_text(int line, int col, char 阅读全文
posted @ 2023-03-30 23:44 shaobky 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 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 int num 阅读全文
posted @ 2023-03-19 15:42 shaobky 阅读(16) 评论(0) 推荐(0) 编辑
摘要: /*task1.c*/ 1 #include <stdio.h> 2 int main() 3 { 4 5 printf(" o \n"); 6 printf("<H>\n"); 7 printf("I I\n"); 8 9 return 0; 10 } /*task1_2.c*/#include 阅读全文
posted @ 2023-03-02 22:36 shaobky 阅读(19) 评论(0) 推荐(0) 编辑