>
其他
>
编写程序完成计算正整数3829的各位数字平方和
人气:470 ℃ 时间:2020-02-03 15:21:38
解答
#include "stdio.h"
#include "stdlib.h"
int main(){
int x=3829;
int a1,a2,a3,a4;
int sum;
a1=x/1000;
a2=x/100%10;
a3=x/10%10;
a4=x%10;
sum=a1*a1+a2*a2+a3*a3+a4*a4;
printf("the sum is %d\n",sum);
return 0;
}
推荐
某四位数正整数的各位数字平方和为50,求有多少这样的四位正整数?
跪求四位正整数的各位数字的平方和为50 求满足条件的四位正整数之和
5个连续正整数;前3个数的平方和比后两个数的积小1,求这5个连续正整数
如果三个连续正整数的平方和为29,那么这三个数是
两个连续正整数的平方和是841,求这两个数
已知不等式|x-2|≤a(a>0)的解集为{x|-1≤a≤c},求a+2c的值
I never()that I should see you again ,用dream 的适当形式填空
计算x²-2x+1/x²-1÷x-1/(x²+x)-x的值,其中x=2012.甲同学把x=2012抄成x=2102,他的结果正确吗?为什么
猜你喜欢
The sea is very beautiful when the sun is shining __ it.A.on B.over
描写安静环境的成语有哪些
世界上跑得最快的动物是猎豹还是鸵鸟
英语翻译
把一个棱长10厘米的正方形分割成大小相等的两个长方形,表面积增加( )平方厘米,每个长方形的表面积是( )
主题班会的主持稿怎么写?主题是走进名人
滴有酚酞的氢氧化钙溶液与下列各物质恰好完全反应后酚酞仍显红色的是( ) A.稀硫酸 B.氯化铜溶液 C.碳酸钾溶液 D.二氧化碳
碎砖粒能不能放进量筒里用排水法测出体积?
© 2024 79432.Com All Rights Reserved.
电脑版
|
手机版