摘要: test4 代码: #include<stdio.h>#include<stdlib.h> int main(){ int num=0; char ch; FILE *fp; fp=fopen("data4.txt","r"); if(fp==NULL) {printf("fail\n"); ret 阅读全文
posted @ 2023-06-14 10:37 Nuyoah720 阅读(11) 评论(0) 推荐(0) 编辑
摘要: test1 代码 #include <stdio.h>#include <string.h> #include<stdlib.h>#define N 10 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char 阅读全文
posted @ 2023-05-30 23:19 Nuyoah720 阅读(4) 评论(0) 推荐(0) 编辑
摘要: test 1 (1)代码 #include <stdio.h>#include <stdlib.h>#define N 4int main(){int x[N] = {1, 9, 8, 4};int i;int *p;// 方式1:通过数组名和下标遍历输出数组元素for (i = 0; i < N; 阅读全文
posted @ 2023-05-06 00:04 Nuyoah720 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 实验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", si 阅读全文
posted @ 2023-04-19 22:05 Nuyoah720 阅读(7) 评论(0) 推荐(0) 编辑
摘要: test1 代码 #include <stdio.h>#include <stdlib.h>#include <time.h>#include <windows.h>#define N 80void print_text(int line, int col, char text[]); void p 阅读全文
posted @ 2023-04-05 22:28 Nuyoah720 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 代码: #include<stdio.h> #include<stdlib.h>#include<time.h> #define N 5#define R1 586#define R2 701int main(){ int number; int i; srand (time(0)); 阅读全文
posted @ 2023-03-20 22:22 Nuyoah720 阅读(13) 评论(0) 推荐(0) 编辑
摘要: TEST 1 实验代码 #include<stdio.h>int main(){ printf(" O O \n"); printf("<H> <H>\n"); printf("I I I I\n"); getchar(); return 0;} #include<stdio.h>int main( 阅读全文
posted @ 2023-03-04 10:36 Nuyoah720 阅读(10) 评论(0) 推荐(0) 编辑