摘要: #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #define N 100 int F(int n,int a[N]){ int i,j,p,q,m,t; int b[N]={0}; if(n==0){ 阅读全文
posted @ 2024-04-29 17:33 zy050101- 阅读(1) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #define N 100 int main(){ int n,x,y,i,j,p,q,t,s; char a[N]={'0'}; while(scanf 阅读全文
posted @ 2024-04-29 16:56 zy050101- 阅读(10) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #define N 20 int main(){ int n,i,j,k,p,q; while(scanf("%d",&n) != EOF){ int a 阅读全文
posted @ 2024-04-23 14:48 zy050101- 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 实验任务4:\ #include <stdio.h> int main() { int i=0; char s; FILE *fp; fp=fopen("data4.txt","r"); while(1){ s=fgetc(fp); if(s==EOF){ break; } else if(s==' 阅读全文
posted @ 2023-12-17 20:20 zy050101- 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 实验任务4: #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 阅读全文
posted @ 2023-12-12 19:36 zy050101- 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 实验任务1: 1.1: 1.功能:寻找到输入的多个数据中最大的和最小的数据 2.指向该数组中的第一项 1.2: 1.返回的是该数组中最大数据的地址 2.不行,算法表达不正确 实验任务2: 2.1: 问题1: 大小:24 计算:数组s1的大小 统计:数组的数据字符串的长度 问题2:不行 表达不正确 2 阅读全文
posted @ 2023-12-03 21:48 zy050101- 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 实验任务1; 1.1: 1.int型数组a,在内存中 连续存放 #include <stdio.h> #define N 4 void test1() { int a[N]={1,9,8,4}; int i; printf("sizeof(a)=%d\n",sizeof(a)); for(i=0;i 阅读全文
posted @ 2023-11-19 20:05 zy050101- 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 实验任务1: 通过三个函数,达成每隔相同的时间在随机的行和位置输出相同的文本的效果 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(i 阅读全文
posted @ 2023-10-30 17:27 zy050101- 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 实验任务1: 问题一:随机获得一个在374到465之间的自然数 问题二:获得五个不重复的最后三位数在374到465之间的学号 实验任务2: #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { char sign; 阅读全文
posted @ 2023-10-16 17:35 zy050101- 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 1.实验任务1 源代码 #include<stdio.h>int main(){ printf(" o o\n"); printf("<H> <H>\n"); printf("I I I I\n"); getch(); return 0;} 运行结果 2.实验任务2 源代码 #include<std 阅读全文
posted @ 2023-10-05 21:04 zy050101- 阅读(6) 评论(0) 推荐(0) 编辑