摘要: 1. #include<stdio.h> #include<stdlib.h> int main() { int ch=0; int a=0; FILE *fp; fp=fopen("data4.txt","r"); if(fp==NULL){ printf("fail to open\n"); r 阅读全文
posted @ 2024-06-24 12:58 nuistzy 阅读(18) 评论(0) 推荐(0)
摘要: task4 #include <stdio.h> #include <stdlib.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double 阅读全文
posted @ 2024-06-09 12:04 nuistzy 阅读(25) 评论(0) 推荐(0)
摘要: task1_1 #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pmin, int *pmax 阅读全文
posted @ 2024-05-22 22:32 nuistzy 阅读(23) 评论(0) 推荐(0)
摘要: task1_1 #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a)); // 输出int 阅读全文
posted @ 2024-05-19 18:10 nuistzy 阅读(23) 评论(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[]); // 函数声明 阅读全文
posted @ 2024-04-28 22:32 nuistzy 阅读(12) 评论(0) 推荐(0)
摘要: 实验一 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 int main(){ int number; int i; srand(time(0)); for(i=0;i<N;++i){ number=rand()%6 阅读全文
posted @ 2024-04-14 21:07 nuistzy 阅读(23) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } #include <stdio.h> int main() { printf(" O\n"); printf( 阅读全文
posted @ 2024-03-16 19:50 nuistzy 阅读(114) 评论(2) 推荐(1)