Advertisement
dim4o

Loops_02_NumbersNotDivisibleBy3and7

Mar 26th, 2014
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1.  static void Main()
  2.         {
  3.             int number = int.Parse(Console.ReadLine());
  4.  
  5.             for (int index = 1; index <= number; index++)
  6.             {
  7.                 if (index % 3 == 0 || index % 7 == 0)
  8.                 {
  9.                     continue;
  10.                 }
  11.                 Console.Write("{0} ", index);
  12.             }
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement