PROGRAM IsPerfectNumber(INPUT,OUTPUT);
VAR
I, N, S: INTEGER;
BEGIN
WRITE('N = ');
READLN(N);
S := 0;
FOR I := 1 TO N
DO
IF N MOD I = 0
THEN
S := S + I ;
WRITELN
IF S - N = N
THEN
WRITE('Äà')
ELSE
WRITE('Íåò')
WRITELN
END.
Помогите, почему программа не правильная?
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.