摘要: task 4 #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 5, M = 100; int main() { char ch[M]; int n = 0; FILE *fp; fp = fopen(" 阅读全文
posted @ 2023-06-15 01:21 睡猛龙 阅读(8) 评论(0) 推荐(0) 编辑
摘要: task 1 // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数 阅读全文
posted @ 2023-05-31 21:21 睡猛龙 阅读(2) 评论(0) 推荐(0) 编辑
摘要: tsak 1_1 #include<stdio.h> #define N 4 int main() { int x[N] = {1, 8, 8, 4}; int i; int *p; // 方式1:通过数组名和下标遍历输出数组元素 for(i = 0; i < N; ++i) printf("%d" 阅读全文
posted @ 2023-05-09 16:53 睡猛龙 阅读(10) 评论(0) 推荐(0) 编辑
摘要: task 1_1 #include<stdio.h> #define N 4 int main() { int a[N] = {2, 0, 2, 3}; char b[N] = {'2', '0', '2', '3'}; int i; printf("sizeof(int) = %d\n", siz 阅读全文
posted @ 2023-04-20 00:35 睡猛龙 阅读(7) 评论(0) 推荐(0) 编辑
摘要: test 1 #include<stdio.h> #include<stdlib.h> #include<time.h> #include<windows.h> #define N 80 void print_text(int line, int col, char text[]); // 函数声明 阅读全文
posted @ 2023-04-03 20:59 睡猛龙 阅读(25) 评论(0) 推荐(0) 编辑
摘要: test 1 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 #define R1 586 #define R2 701 int main() { int number; int i; srand( time(0) 阅读全文
posted @ 2023-03-19 14:23 睡猛龙 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 // 打印一个字符小人 #include<stdio.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); printf(" o \n"); printf("<H>\n"); printf("I I\n"); 阅读全文
posted @ 2023-03-05 14:40 睡猛龙 阅读(14) 评论(0) 推荐(0) 编辑