摘要: 实验任务4: #include<stdio.h> int main() { char s[100]; FILE *fp; int i = 0,j,k = 0; char ch; fp = fopen("data4.txt","rb"); if(fp == NULL) { printf("fail t 阅读全文
posted @ 2023-06-09 21:52 都行吧 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 试验任务4: #include <stdio.h> #include<string.h> #define N 100 typedef struct { char num[10]; // 学号 int s1; // 期末成绩 int s2; // 平时成绩 double sum; // 总评 char 阅读全文
posted @ 2023-05-27 16:11 都行吧 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 实验任务1: 1.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"); for(p= 阅读全文
posted @ 2023-05-07 15:47 都行吧 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 任务1.1 #include <stdio.h> #define N 4 int main() { int a[N] = {2,0,2,3}; int b[N] = {'2','0','2','3'}; int i; printf("sizeof(int) = %d\n",sizeof(int)); 阅读全文
posted @ 2023-04-16 16:16 都行吧 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 任务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 阅读全文
posted @ 2023-04-01 15:40 都行吧 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 实验任务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( t 阅读全文
posted @ 2023-03-18 21:24 都行吧 阅读(23) 评论(0) 推荐(0) 编辑
摘要: //实验任务1//打印一个字符小人 #include<stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } 代码1.1: //打印一个字符小人 #include<stdio.h> in 阅读全文
posted @ 2023-03-03 11:29 都行吧 阅读(21) 评论(0) 推荐(0) 编辑