摘要: #include<stdio.h> main(){ char str[20]; int i,cnt; cnt=i=0; gets(str); while(str[i]!='\0') { if(str[i]>='A'&&str[i]<='Z') cnt++; i++; } printf("大写字母个数 阅读全文
posted @ 2021-11-27 22:52 梅川丘库 阅读(25) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<string.h> void a(); void b(); void c(); void d(); void e(); main(){ a(); } void a(){ int i; printf("主菜单\n1.登录\n2.注册\n3.输入水仙 阅读全文
posted @ 2021-11-27 22:26 梅川丘库 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h>main(){ int x,guess; srand((unsigned int)time(NULL)); guess=rand()%100; while(1){ printf("请输入数 阅读全文
posted @ 2021-11-27 22:19 梅川丘库 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> main(){ double m[8]; int i; for(i=0;i<=7;i++) scanf("%lf",&m[i]); for(i=7;i>=0;i--) printf("%f",m[i]); } #include<stdio.h> main(){ d 阅读全文
posted @ 2021-11-22 17:24 梅川丘库 阅读(23) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> main(){ int a; scanf("%d",&a); if(a>0) printf("正数\n"); else if(a==0) printf("0\n"); else printf("负数\n"); } #include<stdio.h> main(){ 阅读全文
posted @ 2021-11-22 17:10 梅川丘库 阅读(23) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> main(){ int i,j; for(i=1;i<=5;i++){ for(j=1;j<=i;j++){ printf("*"); } printf("\n"); } } #include<stdio.h> main(){ int i,j,k; for(i=1 阅读全文
posted @ 2021-11-09 10:11 梅川丘库 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> main(){ int i=1;int sum=0; while(i<=21) {sum+=i; i+=2; } printf("sum=%d\n",sum); } #include<stdio.h> main(){ int i=1;double sum=0; i 阅读全文
posted @ 2021-11-02 16:32 梅川丘库 阅读(10) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> main(){ int mark; pringtf("请输入学生分数(0-100):\n"); scanf("%d",&mark); switch(mark/10) { case 10: case 9:printf("A\n"); case 8:printf("B 阅读全文
posted @ 2021-10-26 10:24 梅川丘库 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> main(){ int a; scanf("%d",&a); if(a>0) printf("正数\n"); else if(a==0) printf("既不是正数也不是负数\n"); else printf("负数\n"); } 2 #include<std 阅读全文
posted @ 2021-10-19 11:00 梅川丘库 阅读(35) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> main(){ int a=3; int b=4; printf("%d %d\n",a,b); } #include<stdio.h> main(){ float a=7; double b=8; printf("%f %lf\n",a,b); } #inclu 阅读全文
posted @ 2021-10-12 10:28 梅川丘库 阅读(30) 评论(0) 推荐(0) 编辑