This code where wrong, I can not find, infinite loop, who can help me
To find the number of c + +
#include
using namespace std;
Int main () {
Int I, j, k, l, a, [10].
for (i=2; i <=1000; I++) {
int sum=0;
K=0;
L=0;
For (j=1; J & lt; i; J++) {
If (I % j==0) {
The sum +=j;
A [k]=j;
k++;
L++;
}
}
If (sum==I) {
Cout & lt; for (i=0; i Cout & lt; Cout & lt; }
}
return 0;
} CodePudding user response:
for (i=2; i <=1000; I++) {
.
for (I=0; i Cout & lt;
}
Use the same variable I do control CodePudding user response: