编程实现:输入整数a和b,若a2+b2大于100,则输出a2+b2百位以上的数字,否则输出两数之和
人气:263 ℃ 时间:2020-07-17 04:24:55
解答
#include"stdlib.h" #include"stdio.h" void main(){int a,b;scanf("%d %d",&a,&b);a=a*a;b=b*b;int temp=a+b;if(temp>100){temp/=100;printf("%d\n",temp);}else{printf("%d\n",temp);}}不知道你要的是a的平方+b的...
推荐
- 1、编制程序要求输入整数a和b,若a2+b2大于100,则输出a2+b2百位以上的数字,否则输出两数字之和.
- 输入整数a和b,若a2+b2大于100,则输出a2+b2百位以上的数字(如a2+b2 等于1234,则输出12) ,否则输出两数之和.
- 已知a、b是正整数,且a2=b2+24,那么数对(a,b)为
- a b c d为整数而且m=a2+b2 n=c2+d2 那么m n是否能表示两个数的平方和
- 已知a,b,c,d都是整数,求证:(a2+b2)(c2+d2)是两个完全平方数的和.
- 在括号内填词
- 修路队修一条长1200米的铁路,第一天修了全长的20%,第二天修了全长的20%,还剩下多少米没有修?(用方程)
- 清明节的来历100——230字
猜你喜欢