摘要: 1 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() { 5 FILE *fin, *fout; // 定义文件类型指针 6 int ch; 7 8 fin = fopen("file1.txt", "r"); // 以只读文本方式打 阅读全文
posted @ 2021-06-11 13:02 wyfaa 阅读(95) 评论(2) 推荐(0)
摘要: 1 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #define N 3 5 6 typedef struct student{ 7 int id; 8 char name[20]; 9 char subject[20 阅读全文
posted @ 2021-06-05 10:54 wyfaa 阅读(90) 评论(1) 推荐(0)
摘要: 1 1 #include<stdio.h> 2 3 const int N=3; 4 int main(){ 5 int a[N] = {1, 2, 3}; 6 int i; 7 8 printf("通过数组名和下标直接访问数组元素:\n"); 9 for(i=0; i<N; i++) 10 pri 阅读全文
posted @ 2021-05-22 16:32 wyfaa 阅读(89) 评论(2) 推荐(0)
摘要: 1 1 #include<stdio.h> 2 long long fun(int n); 3 4 int main(){ 5 int n; 6 long long f; 7 8 while(scanf("%d", &n) != EOF){ 9 f = fun(n); 10 printf("n = 阅读全文
posted @ 2021-04-25 17:16 wyfaa 阅读(111) 评论(3) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 #define N 5 5 6 int main(){ 7 int x, n; 8 9 srand(time(0)); 10 11 for(n=1; n<=N; n++){ 1 阅读全文
posted @ 2021-04-10 17:23 wyfaa 阅读(227) 评论(2) 推荐(0)
摘要: #include <iostream> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** arg 阅读全文
posted @ 2021-03-28 18:56 wyfaa 阅读(110) 评论(4) 推荐(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 o \n"); printf( 阅读全文
posted @ 2021-03-17 23:06 wyfaa 阅读(77) 评论(1) 推荐(0)