Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Task3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = ReadInt();
- Console.WriteLine("Вы ввели число: " + number);
- Console.ReadKey();
- }
- static int ReadInt()
- {
- int number;
- string input = "";
- while (false == int.TryParse(input, out number))
- {
- Console.Write("Введите число:");
- input = Console.ReadLine();
- }
- return number;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement