Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("Please enter number");
- int num = Convert.ToInt32(Console.ReadLine());
- int i = 0;
- if (num < 1)
- {
- Console.WriteLine("Please enter a number greater than 1!");
- }
- else
- {
- while (i<=num)
- {
- Console.WriteLine(i);
- i++;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement