摘要:
1.字符串的长度. 1 2 3 4 5 6 7 8 9 10 11 12 #include<stdio.h> main() { char str[80]; int i=0; int length=0; gets(str); puts(str); while(str[i++]!='\0') lengt 阅读全文
posted @ 2021-11-29 18:03
Y君莫笑X
阅读(34)
评论(0)
推荐(0)
摘要:
1编写程序,统计字符串中大写字母的个数。 #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++; 阅读全文
posted @ 2021-11-29 17:59
Y君莫笑X
阅读(42)
评论(0)
推荐(0)
摘要:
1.实现一个菜单 可以切换 ,可以返回主菜单 主菜单 1.登录 2.注册 3.输出水仙花数 4.退出程序 请选择: 选择后实现对应的功能 #include<stdio.h> #include<string.h> void a(); void b(); void c(); void d(); void 阅读全文
posted @ 2021-11-29 17:55
Y君莫笑X
阅读(22)
评论(0)
推荐(0)
摘要:
1.定义一个含有8个储存单元的实行数组,从键盘上接收数,然后逆序输出。 #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]);} 阅读全文
posted @ 2021-11-29 17:45
Y君莫笑X
阅读(71)
评论(0)
推荐(0)
浙公网安备 33010602011771号