11 2021 档案

摘要:1.实现一个菜单 可以切换 ,可以返回主菜单 主菜单 1.登录 2.注册 3.输出水仙花 4.退出程序 请选择: #include<stdio.h>#include<string.h>void denglu();void zhuce();void shuixianhua();main(){ int 阅读全文
posted @ 2021-11-28 23:23 陆雲雲 阅读(46) 评论(0) 推荐(0)
摘要:1.编写程序,统计字符串中大写字母的个数 #include<stdio.h> main() { char str[5]; int i,cnt; cnt=i=0; gets(str); while(str[i]!='\0') {if(str[i]>='A'&&str[i]<='Z') cnt++; i 阅读全文
posted @ 2021-11-28 22:54 陆雲雲 阅读(13) 评论(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-28 22:40 陆雲雲 阅读(37) 评论(0) 推荐(0)
摘要:#include<stdio.h> main(){ int i,j; for(i=1;j<=5;i++){ for(j=1;j<=i;j++){ printf("*"); } printf("\n"); } } 2. #include<stdio.h> main(){ int i,j,k; for( 阅读全文
posted @ 2021-11-15 22:59 陆雲雲 阅读(63) 评论(0) 推荐(0)
摘要:编写程序,使用while语句求和sum=1+3+5+…+21 #include<stdio.h> main(){ int i=1;int sum=0; while(i<=21) { sum+=i; i+=2; } printf("sum=%d\n",sum); } 2.编写程序,使用while语句求 阅读全文
posted @ 2021-11-07 22:20 陆雲雲 阅读(65) 评论(0) 推荐(0)