Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Write a program that prints all the numbers from 1 to N, that are not divisible by 3 and 7 at the same time.
- */
- using System;
- class CantDevideBy3or7
- {
- static void Main(string[] args)
- {
- int number = int.Parse(Console.ReadLine());
- for (int i = 1; i <= number; i++)
- {
- if (i % (3*7) != 0)
- {
- Console.WriteLine(i);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement