#include
using namespace std;
Int main () {
Int I, x, sum=0;
For (I=100; i<=999; I++) {
While (i> 0 {
X=I % 10;
The sum +=x x x x x
I/=10;
}
If (sum==I) {
cout}
}
return 0;
}
CodePudding user response:
I/=10 this sentence to modify I doBelow the if (sum==I) inside of the I is 0, is not the original you to determine the number of
You can define an initial value outside of variables is positive p
Will be changed to the while p> 0
Then will I/=10 this changes
P=I;
P/=10;
CodePudding user response: