编程实现c语言,输入整数a和b,若a^2+b^2大于500,则输出a^2+b^2百位以上的数字,否则输出两数之和

[复制链接]
查看11 | 回复3 | 2013-3-27 19:14:31 | 显示全部楼层 |阅读模式
#includeint main(){int a,b;
scanf("%d%d",&a,&b);
if((a*a+b*b)>500)printf("%d",(int)((a*a+b*b)/100));elseprintf("%d\n",a+b); return 0;}...
回复

使用道具 举报

千问 | 2013-3-27 19:14:31 | 显示全部楼层
#includevoid main(){
int a,b;
printf(“请输入两个整数,用逗号隔开:\n”);
scanf("%d,%d",&a,&b);
if((a*a+b*b)>500)
printf("a^2+b^2百位以上的...
回复

使用道具 举报

千问 | 2013-3-27 19:14:31 | 显示全部楼层
main(){int a,b;
scanf("%d,%d",&a,&b);
if((a*a+b*b)>500)printf("%d",(int)((a*a+b*b)/100));elseprintf("%d\n",a+b); }...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行