云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 华中科技大学标准C语言程序设计及应用习题答案

华中科技大学标准C语言程序设计及应用习题答案

  • 62 次阅读
  • 3 次下载
  • 2025/5/2 22:36:55

文档仅供参考,不当之处,请联系改正。

a4 a8 a3 */

if(((a1+a5+a9) == (a2+a6+a7)) && ((a1+a5+a9) ==

(a3+a4+a8))

&&

((a1+a6+a8)

==

(a5+a7+a3))

&&

((a1+a5+a9) == (a2+a4+a9)))

{

printf(\

,a4,a8,a3);

}

return;

} 5.4

}

}

#include

void main(void) {

char input1[100],input2[100],input3[100]; int i,Eng=0,eng=0,num=0,blank=0,other=0;

25

2020年4月19日

文档仅供参考,不当之处,请联系改正。

printf(\3 rows of character,each row don't exceed 80

characters:\\n\

gets(input1);

printf(\

gets(input2);

printf(\

gets(input3);

/*test the first row*/ for(i=0; i<100; i++) { if(input1[i]=='\\0')

goto Loop1;

else if(('A'<=input1[i])&&(input1[i]<='Z')==1)

Eng++;

else if(('a'<=input1[i])&&(input1[i]<='z')==1)

eng++;

else if(('0'<=input1[i])&&(input1[i]<='9')==1)

num++;

else if(input1[i]==32)

blank++;

else other++;

2020年4月19日

26

文档仅供参考,不当之处,请联系改正。

}

/*test the second row*/ Loop1: for(i=0; i<100; i++)

{ if(input2[i]=='\\0')

goto Loop2; else if(('A'<=input2[i])&&(input2[i]<='Z')==1)

Eng++;

else if(('a'<=input2[i])&&(input2[i]<='z')==1)

eng++;

else if(('0'<=input2[i])&&(input2[i]<='9')==1)

num++;

else if(input2[i]==32)

blank++;

else other++;

}

/*test the third row*/ Loop2: for(i=0; i<100; i++)

{ if(input3[i]=='\\0')

goto Loop3;

2020年4月19日

27

文档仅供参考,不当之处,请联系改正。

else if(('A'<=input3[i])&&(input3[i]<='Z')==1)

Eng++;

else if(('a'<=input3[i])&&(input3[i]<='z')==1)

eng++;

else if(('0'<=input3[i])&&(input3[i]<='9')==1)

num++;

else if(input3[i]==32)

blank++;

else other++;

}

Loop3: printf(\english character:%d\\nLower character:%d\\nNumber:%d\\nBlank:%d\\nOther characters:%d\\n\ } 5.5

#include

void main(void) { char str1[80],str2[40];

int i,j,k;

2020年4月19日

english 28

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

文档仅供参考,不当之处,请联系改正。 a4 a8 a3 */ if(((a1+a5+a9) == (a2+a6+a7)) && ((a1+a5+a9) == (a3+a4+a8)) && ((a1+a6+a8) == (a5+a7+a3)) && ((a1+a5+a9) == (a2+a4+a9))) { printf(\,a4,a8,a3); } return;

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com