摘要: // 将file1.txt中小写字母转换成大写后,另存为file2.txt #include <stdio.h> #include <stdlib.h> int main() { FILE *fin, *fout; // 定义文件类型指针 int ch; fin = fopen("file1.txt 阅读全文
posted @ 2021-06-11 11:41 李一鑫 阅读(23) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; /*学生学号 */ char name[20] 阅读全文
posted @ 2021-06-10 16:36 李一鑫 阅读(33) 评论(1) 推荐(0)
摘要: #include<stdio.h> const int N=3; int main(){ int a[N] = {1, 2, 3}; int i; printf("通过数组名和下标直数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a[i], a[i 阅读全文
posted @ 2021-05-26 20:13 李一鑫 阅读(62) 评论(2) 推荐(0)
摘要: #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 = %d, 阅读全文
posted @ 2021-04-29 21:09 李一鑫 阅读(55) 评论(1) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int x, n; srand(time(0)); for(n=1; n<=N; n++) { x =1+ rand() % 31; p 阅读全文
posted @ 2021-04-15 11:21 李一鑫 阅读(67) 评论(1) 推荐(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-29 15:59 李一鑫 阅读(152) 评论(2) 推荐(0)
摘要: #include <stdio.h> int main(){ printf(" o o\n"); printf(" <H> <H>\n"); printf(" I I I I\n"); return 0; } #include <stdio.h> int main() { int x, y; int 阅读全文
posted @ 2021-03-17 22:45 李一鑫 阅读(48) 评论(1) 推荐(0)
点击右上角即可分享
微信分享提示