locale-test/02.cpp

14 lines
183 B
C++

#include<iostream.h>
int main()
{
int x,a,b,c;
for(x=100;x<1000;x++)
{
a=x/100;
b=(x%100)/10;
c=x%10;
if(x==a*a*a+b*b*b+c*c*c)
cout<<x<<" ";
}
return 0;
}