摘要: TASK 4 #include <stdio.h> int main() { char ch; int count=0; FILE *fp; fp = fopen("D:\data4.txt", "r"); if(fp == NULL) { printf("fail to open file\n") 阅读全文
posted @ 2023-06-13 09:49 呓语-c 阅读(21) 评论(0) 推荐(0)
摘要: TASK 1 //结构体类型的定义,数组的输入输出、元素访问 //编写input()实现学生信息的录入 //output()实现输出 //calc()计算总评成绩和等级 //sort()对学生的成绩按总评排序 #include<stdio.h> #include<string.h> #define 阅读全文
posted @ 2023-05-31 21:05 呓语-c 阅读(15) 评论(0) 推荐(0)
摘要: TASK 1 #include<stdio.h> #define N 4 int main(){ int x[N]={1,9,8,4}; int i; int *p; //1.通过数组名和下标遍历输出数组元素 for(i=0;i<N;++i) printf("%d",x[i]); printf("\ 阅读全文
posted @ 2023-05-10 23:00 呓语-c 阅读(19) 评论(0) 推荐(0)
摘要: TASK 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 23:21 呓语-c 阅读(7) 评论(0) 推荐(0)
摘要: TASK 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[]); // 阅读全文
posted @ 2023-04-05 20:12 呓语-c 阅读(26) 评论(0) 推荐(0)
摘要: TASK1 //程序作用 :随机生成五个学号 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 #define R1 586 #define R2 701 int main() { int number; int i 阅读全文
posted @ 2023-03-21 18:51 呓语-c 阅读(24) 评论(0) 推荐(0)
摘要: 实验任务一 程序源代码(task1.1.c) //打印一个字符小人 #include<stdio.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); printf(" o \n"); printf("<H>\n"); 阅读全文
posted @ 2023-03-04 13:15 呓语-c 阅读(10) 评论(0) 推荐(0)