摘要: #include<stdio.h>#define _CRT_SECURE_NO_WARNINGS#include<stdlib.h>int main(){ char ch; int count=0; FILE *fp; fp=fopen("data4.txt","r"); if(fp==NULL) 阅读全文
posted @ 2022-12-25 13:49 小王同志6 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> #include <string.h> #define N 10 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 阅读全文
posted @ 2022-12-25 13:41 小王同志6 阅读(11) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #define N 4 int main() { int a[N] = { 1, 9, 8, 4 }; char b[N] = { '1', '9', '8', '4' }; int i; printf("sizeof(int) = %d\n", sizeof( 阅读全文
posted @ 2022-11-29 22:20 小王同志6 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1. #include<stdio.h>long fun(long s);int main(){ long s,t; printf("enter a number:"); while(scanf_s("%ld",&s)!=EOF){ t=fun(s); printf("new number is:% 阅读全文
posted @ 2022-11-08 21:46 小王同志6 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1. #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 阅读全文
posted @ 2022-10-25 23:03 小王同志6 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 1.#include<stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } 2.#include<stdio.h> #include<math.h> int main() { doub 阅读全文
posted @ 2022-10-18 21:48 小王同志6 阅读(9) 评论(0) 推荐(0) 编辑