Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Taxk346
- {
- using System;
- class Program
- {
- static void Main(string[] args)
- {
- string text = Console.ReadLine();
- int x1 = int.Parse(Console.ReadLine());
- int x2 = int.Parse(Console.ReadLine());
- int num = 0;
- bool isInteger = int.TryParse(text, out num);
- if (isInteger && num >= x1 && num <= x2)
- {
- Console.WriteLine(num);
- }
- else
- {
- Console.WriteLine($"The '{text}' is not a integer number");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement