摘要: #include <stdio.h> #include <string.h> #include <stdlib.h> #define N 10 typedef struct { long int id; char name[20]; float objective; // 客观题得分 float s 阅读全文
posted @ 2022-12-24 15:25 杨恺杰 阅读(28) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define N 10 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 } Book; int main() { Book 阅读全文
posted @ 2022-12-21 21:56 杨恺杰 阅读(23) 评论(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(int)); printf("size 阅读全文
posted @ 2022-11-27 20:04 杨恺杰 阅读(31) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<math.h> int is_prime(int s); int main(){ int n; int a,b; for(n=4;n<=20;n=n+2){ for(a=2;a<=n;a++){ b=n-a; 阅读全文
posted @ 2022-11-06 14:13 杨恺杰 阅读(47) 评论(0) 推荐(0)
摘要: #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=rand()%500+ 阅读全文
posted @ 2022-10-20 22:31 杨恺杰 阅读(46) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdio.h> #include<stdlib.h> int main() { char ans1,ans2; printf("每次课前认真预习、课后及时复习了没? (输入y或Y表示有,输入n或N表示没有) :"); ans1=getchar( 阅读全文
posted @ 2022-10-13 13:20 杨恺杰 阅读(24) 评论(0) 推荐(0)