Advertisement
Masovski

[C# Basics][Loops-HW] 2. Numbers Not Divisible by 3 and 7

Mar 29th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System;
  2.  
  3. class NumbersNotDivisableBy3And7
  4. {
  5.     static void Main()
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.  
  9.         for (int i = 1; i <= n; i++)
  10.         {
  11.             if (i % 7 == 0 || i % 3 == 0)
  12.             {
  13.  
  14.             }
  15.             else
  16.             {
  17.                 Console.WriteLine(i);
  18.             }
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement