Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Collections.Specialized;
- using System.Diagnostics.CodeAnalysis;
- using System.Dynamic;
- using System.Globalization;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using System.IO;
- namespace CSLight
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = ReadInt();
- Console.WriteLine($"{number} является числом.");
- }
- static int ReadInt()
- {
- int number;
- string command = "";
- while (!int.TryParse(command, out number))
- {
- Console.Write("Введите число:");
- command = Console.ReadLine();
- Console.Clear();
- }
- return number;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment