Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class testLoops
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- while (n <= 0 || n > 100)
- {
- Console.WriteLine("Invalid Number!");
- int num = int.Parse(Console.ReadLine());
- n = num;
- }
- Console.WriteLine("The number is: " + n);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement