求这道c语言题的代码

2024-12-19 01:22:35
推荐回答(1个)
回答1:

#include

int main()
{
int n,a,b,c;

scanf("%d",&n);
if(n>=100&&n<=999)
{
a=n%10;
b=n/10%10;
c=n/100;
if(a*a*a+b*b*b+c*c*c==n)
printf("Yes");
else
printf("No");
}
else
printf("Invalid Value!");
return 0;
}