Why change the for loop to the while loop is wrong? Close number of
# include & lt; stdio.h>
Int factorsum (int x) {
Int a=1, sum=0;
While (a
Sum=sum + a;
+;
}
return sum;
}
Int main () {
Int n, I=1, j, m;
The scanf (" % d ", & amp; N);
While (i<=n) {
M=factorsum (I);
For (j=I + 1; J<=n; J++)
{
If (factorsum (j)==i& & M=={j)
Printf (" % d<- & gt; % d \ n ", I, j); }
}
i++;
}
}