Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Please enter a whole number");
- int num = Convert.ToInt32(Console.ReadLine());
- for (int i = 1; i <= num; i++)
- {
- if (((i % 3) != 0) || (i % 7) != 0)
- {
- Console.WriteLine(i);
- }
- else
- {
- Console.WriteLine("Invalid Input!");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement