摘要: 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"); return 阅读全文
posted @ 2023-06-13 17:40 超级peipei 阅读(6) 评论(0) 推荐(0) 编辑
摘要: TEST4 #include <stdio.h> #include <stdlib.h> #include<string.h> #define N 100 typedef struct { char num[10]; // 学号 int s1; // 期末成绩 int s2; // 平时成绩 dou 阅读全文
posted @ 2023-05-30 00:03 超级peipei 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #define N 4 int main() { int x[N]={1,9,8,4}; int i; int *p; //方法一:数组名和下标 for(i=0;i<N;++i) printf("%d",x[i]); prin 阅读全文
posted @ 2023-05-07 01:06 超级peipei 阅读(18) 评论(0) 推荐(0) 编辑
摘要: TASK1_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",sizeof(int)); pri 阅读全文
posted @ 2023-04-16 19:49 超级peipei 阅读(11) 评论(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[]);void print 阅读全文
posted @ 2023-04-02 15:13 超级peipei 阅读(26) 评论(0) 推荐(0) 编辑
摘要: TEST 1 源代码: #include<stdlib.h>#include<stdio.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-17 23:01 超级peipei 阅读(27) 评论(0) 推荐(0) 编辑
摘要: tesk1 //打印一个字符小人 #include<stdio.h>int main(){ printf(" 0 \n"); printf("<H>\n"); printf("I I\n"); getchar(); return 0;} tesk2 //1+2+3+...+n(设n的取值在100之内 阅读全文
posted @ 2023-03-03 23:44 超级peipei 阅读(12) 评论(0) 推荐(0) 编辑