Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [StartCode]
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp13
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int number ;
- ConvercionData(out number);
- }
- static void ConvercionData (out int number )
- {
- bool open = true;
- number = 0;
- while (open == true)
- {
- Console.Write("Введите число : ");
- string data = Console.ReadLine();
- if (int.TryParse(data, out number))
- {
- Console.WriteLine(number);
- open = false;
- }
- else
- {
- Console.WriteLine("Таких не бывает чисел .");
- }
- }
- }
- }
- }
- [EndCode]
Advertisement
Add Comment
Please, Sign In to add comment