摘要: #include<stdio.h> int main() { int cnt=0; char ch; FILE *fp; fp=fopen("data4.txt","r"); if(fp==NULL) { printf("fail to open file\n"); return 0; } whil 阅读全文
posted @ 2024-06-24 09:06 刘雨彤 阅读(13) 评论(0) 推荐(0)
摘要: task。1 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 cha 阅读全文
posted @ 2024-06-10 11:18 刘雨彤 阅读(32) 评论(0) 推荐(0)
摘要: task1.1 #include<stdio.h> #define N 5 void input(int x[],int n); void output(int x[],int n); void find_min_max(int x[],int n,int *pmin,int *pmax); int 阅读全文
posted @ 2024-05-26 23:28 刘雨彤 阅读(20) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a)); // 输出int类型数组a中每个 阅读全文
posted @ 2024-05-19 23:16 刘雨彤 阅读(10) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> #include<windows.h> #define N 80 void print_text(int line,int col,char text[]); void print_space 阅读全文
posted @ 2024-04-28 21:23 刘雨彤 阅读(18) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand( time(0) ); // 以当前系统时间作为随机种子 for(i = 0; i < 阅读全文
posted @ 2024-04-15 07:44 刘雨彤 阅读(10) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { printf(" O\n"); printf("<H>\n"); printf("I I\n"); return 0; } #include<stdio.h> int main() { printf(" O\n"); printf("<H 阅读全文
posted @ 2024-03-13 20:05 刘雨彤 阅读(23) 评论(0) 推荐(0)