摘要: 1、实验4 源代码 1 #include <stdio.h> 2 3 int main() 4 { 5 FILE *fp; 6 char ch; 7 int i=0; 8 fp=fopen("data4.txt","r"); 9 if(fp==NULL){ 10 printf("fail to op 阅读全文
posted @ 2023-12-18 22:28 李雨诗 阅读(22) 评论(0) 推荐(0)
摘要: 1、实验1 运行结果 2、实验2 源代码 1 #include <stdio.h> 2 #include <string.h> 3 #define N 10 4 #define M 80 5 6 typedef struct { 7 char name[M]; // 书名 8 char author 阅读全文
posted @ 2023-12-17 22:56 李雨诗 阅读(62) 评论(0) 推荐(0)
摘要: 1、实验一 源代码 1 #include<stdio.h> 2 #define N 5 3 4 void input(int x[],int n); 5 void output(int x[],int n); 6 void find_min_max(int x[],int n,int *pmin,i 阅读全文
posted @ 2023-12-02 23:11 李雨诗 阅读(30) 评论(0) 推荐(0)
摘要: 1、实验一 实验1_1 源代码 1 #include<stdio.h> 2 #define N 4 3 4 void test1() 5 { 6 int a[N] = {1,9,8,4}; 7 int i; 8 printf("sizeof(a) = %d\n",sizeof(a)); 9 for( 阅读全文
posted @ 2023-11-19 14:04 李雨诗 阅读(42) 评论(0) 推荐(0)
摘要: 1、实验1 实验1 运行结果 实现了每隔一秒随机弹出“hi,November~”。 2、实验2 实验2-1 源代码 1 #include<stdio.h> 2 long long fac(int n); 3 4 int main() 5 { 6 int i,n; 7 8 printf("Enter 阅读全文
posted @ 2023-11-05 14:28 李雨诗 阅读(47) 评论(0) 推荐(0)
摘要: 1、实验1 实验1 源代码 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<math.h> 4 5 #define N 5 6 #define N1 374 7 #define N2 465 8 9 int main() 10 { 11 int 阅读全文
posted @ 2023-10-18 22:53 李雨诗 阅读(46) 评论(0) 推荐(0)
摘要: 1.实验1 实验1.1 源代码 1//打印一个字符小人 2 3 #include<stdio.h> 4 int main() 5 { 6 printf(" 0\n"); 7 printf("<H>\n"); 8 printf("I I\n"); 9 printf(" 0\n"); 10 printf 阅读全文
posted @ 2023-10-01 21:45 李雨诗 阅读(49) 评论(0) 推荐(0)