2021年11月23日
摘要: 1.定义一个含有8个存储单元的实行数据,从键盘上接收数,然后逆序输出; #include<stdio.h> main(){ double a[8]; int i=0; for(i=0;i<=7;i++){ scanf("%lf",&a[i]); } for(i=7;i>=0;i--){ printf 阅读全文
posted @ 2021-11-23 21:32 丝毫不慌 阅读(10) 评论(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-23 21:29 丝毫不慌 阅读(12) 评论(0) 推荐(0) 编辑