摘要: task4 //task4 #include<stdio.h> int main() { int i = 0; char ch; FILE *fp; fp = fopen("data4.txt", "r"); if(fp == NULL) { printf("读取失败\n"); return 1; 阅读全文
posted @ 2023-06-15 09:29 diremo 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1 // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些 阅读全文
posted @ 2023-06-01 12:24 diremo 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.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]);printf("\n"); return 0;} 1.2 #include <st 阅读全文
posted @ 2023-05-11 13:16 diremo 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 实验一#include<stdio.h> #include<stdlib.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",size 阅读全文
posted @ 2023-04-20 14:49 diremo 阅读(27) 评论(0) 推荐(0) 编辑
摘要: task1.c: #include <time.h> #include <stdio.h> #include <stdlib.h> #include <windows.h> #define N 80 void print_text(int line,int col,char text[]); voi 阅读全文
posted @ 2023-04-02 16:56 diremo 阅读(14) 评论(0) 推荐(0) 编辑
摘要: task1.c #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-23 15:28 diremo 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #include <stdio.h> #include <stdlib.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); system("pause"); return 0; } 实验任务2 #inclu 阅读全文
posted @ 2023-03-05 16:11 diremo 阅读(12) 评论(0) 推荐(0) 编辑