Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- var n = int.Parse(Console.ReadLine());
- while( n < 1 || n > 100)
- {
- Console.WriteLine("Invalid number");
- Console.WriteLine("Try again");
- n = int.Parse(Console.ReadLine());
- }
- Console.WriteLine("Valid number= "+n);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement