If a number is just equal to its factor, we say this is "full". For example, the factors of 6 are 1, 2, 3, and 6 = 1 2 3, and therefore 6 is "completed". Please compile all the completed in the program output 1000.
Code:
Var max = 1000;
VAR sum = 1;
VAR i = 2;
Var J;
VAR S = "Most is:"
For (; i <= max; i )
{
For (j = 2; j <= parseint (math.sqrt (i)); J )
{
IF (i% j == 0)
{
IF (j == i / j)
{
SUM = I;
}
Else
{
SUM = J I / J;
}
}
}
IF (i == sum)
{
S = i ""
}
SUM = 1;
}
Alert (s);
script>