Advertisement
dxvmxnd

Untitled

Sep 16th, 2024
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. Program huy;
  2.  
  3. Uses
  4. System.SysUtils;
  5.  
  6. Var
  7. IsCorrect : Boolean;
  8. Num : Integer;
  9.  
  10. Begin
  11. Writeln('Эта программа выводит на экран число');
  12.  
  13. Repeat
  14. Writeln('Введите число:');
  15. IsCorrect := True;
  16. Try
  17. Readln(Num);
  18. Except
  19. IsCorrect := False;
  20. End;
  21. If(Not IsCorrect) Or (Num < 1) Then
  22. Begin
  23. IsCorrect := False;
  24. Writeln('Ошибка');
  25. End;
  26. Until IsCorrect;
  27.  
  28. Writeln('Число: ', Num);
  29.  
  30. Readln;
  31. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement