Advertisement
GigaOrts

READ INT

Aug 24th, 2023
1,011
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.21 KB | None | 0 0
  1. public int ReadInt()
  2. {
  3.     int result;
  4.    
  5.     do
  6.     {
  7.         Console.Write("Введите число: ");
  8.     } while (int.TryParse(Console.ReadLine(), out result) == false);
  9.    
  10.     return result;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement