c语言程序设计源程序(13)
发布时间:2021-06-06
发布时间:2021-06-06
课后作业,求最小值等题目答案
#include<stdio.h>
# include<math.h>
int number;
int is(int number);
int main(void)
{
int n,m;
scanf("%d%d",&n,&m);
for(number=n;number<=m;number++) {
if (number==is(number))
printf("%d ",number);
}
return 0;
}
int is(int number)
{
int a,b,c,s; //scanf("%d%d",&number); a=number%10; b=(number/10)%10; c=number/100;
s=a*a*a+b*b*b+c*c*c; if (number==s)