Проверить, кратно ли число 5 — Pascal(Паскаль)

uses crt;
var
x,code: integer;
st: string;
begin
 clrscr;
 writeln('введите целое число');
 readln(st);
 val(st,x,code);
 if code=0 then
 if x mod 5=0 then writeln('кратно 5') else writeln('не кратно 5')
 else writeln('это не целое число');
 readln;
end.

Leave a Comment

− 2 = 4