I have modified the full code of 1 to 1000 after you change.

xiaoxiao2021-03-05  24

Void main () {INT I, J, SUM; FOR (i = 1; i <= 1000; i ) {SUM = 0; for (j = 1; j <= I / 2; J ) IF (I% J == 0) SUM = J; if (SUM == i) {Printf ("% D ITS Factors Are", Sum); for (j = 1; j <= Sum / 2; J ) IF (SUM% J = = 0) Printf ("% d,", j); printf ("/ n");}} getch ();}

After finding the full definition, it is rewritten.

This time is finally correct.

This is an exercise problem in C language book.

I understand the full concept of the next thing, the factor is generally less than the number required to ask, and the number after the number is obtained, and there is no remainder, which is the number of all factors. .

转载请注明原文地址:https://www.9cbs.com/read-38525.html

New Post(0)