摘要: 任务4 1 #include <stdio.h> 2 3 int main(){ 4 int count=0; 5 char ch; 6 FILE *fp; 7 8 fp = fopen("data4.txt", "r"); 9 if(fp == NULL) { 10 printf("fail to 阅读全文
posted @ 2024-06-22 15:19 听凭风的指引 阅读(16) 评论(0) 推荐(0)
摘要: 任务四 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[80]; // 作者 8 double sales_ 阅读全文
posted @ 2024-06-09 16:43 听凭风的指引 阅读(19) 评论(0) 推荐(0)
摘要: 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, int * 阅读全文
posted @ 2024-05-26 20:17 听凭风的指引 阅读(26) 评论(0) 推荐(0)
摘要: 实验任务1 task1.1 1 #include <stdio.h> 2 #define N 4 3 4 void test1() { 5 int a[N] = {1, 9, 8, 4}; 6 int i; 7 8 // 输出数组a占用的内存字节数 9 printf("sizeof(a) = %d\ 阅读全文
posted @ 2024-05-19 21:17 听凭风的指引 阅读(13) 评论(0) 推荐(0)
摘要: 任务1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 7 void print_text(int line, int col, char t 阅读全文
posted @ 2024-04-27 22:46 听凭风的指引 阅读(21) 评论(0) 推荐(0)
摘要: 任务1 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 7 int main() 8 { 9 int number; 10 int i; 11 12 srand(time(0)); 13 14 阅读全文
posted @ 2024-04-14 23:28 听凭风的指引 阅读(11) 评论(0) 推荐(0)
摘要: //打印一个小人 #include <stdio.h> int main() { printf(" O\n"); printf("<H>\n"); printf("I I\n"); printf(" O\n"); printf("<H>\n"); printf("I I\n"); return 0; 阅读全文
posted @ 2024-03-15 20:22 听凭风的指引 阅读(37) 评论(0) 推荐(0)