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