摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 int main() 4 { 5 int ch=0; 6 int a=0; 7 FILE *fp; 8 9 fp=fopen("data4.txt","r"); 10 11 if(fp==NULL){ 12 pri 阅读全文
posted @ 2024-06-24 09:01 kira绮罗星 阅读(8) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include<stdlib.h> 3 #include <string.h> 4 #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 5 6 typedef struct student { 7 int id; // 学 阅读全文
posted @ 2024-06-06 22:28 kira绮罗星 阅读(15) 评论(0) 推荐(0)
摘要: 1 int main() { 2 int a[N]; 3 int min, max; 4 5 printf("录入%d个数据:\n", N); 6 input(a, N); 7 8 printf("数据是: \n"); 9 output(a, N); 10 11 printf("数据处理...\n" 阅读全文
posted @ 2024-05-24 16:56 kira绮罗星 阅读(12) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include<stdlib.h> 3 #define N 4 4 5 void test1() { 6 int a[N] = {1, 9, 8, 4}; 7 int i; 8 9 // 输出数组a占用的内存字节数 10 printf("sizeof( 阅读全文
posted @ 2024-05-18 09:45 kira绮罗星 阅读(9) 评论(0) 推荐(0)
摘要: 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 text[ 阅读全文
posted @ 2024-04-26 19:28 kira绮罗星 阅读(16) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 #define N 5 5 int main() 6 { 7 int number,i; 8 srand(time(0)); 9 for(i=0;i<N;i++) 10 {nu 阅读全文
posted @ 2024-04-12 18:34 kira绮罗星 阅读(23) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> int main() { printf(" o\n"); printf("<H>\n"); printf("I I\n"); printf(" o\n"); printf("<H>\n"); printf("I I\n"); 阅读全文
posted @ 2024-03-15 19:17 kira绮罗星 阅读(6) 评论(0) 推荐(0)