Guest User

Untitled

a guest
Jul 24th, 2016
346
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 Program
  4. {
  5.     public static void Main ()
  6.     {
  7.         int end = int.Parse (Console.ReadLine ());
  8.         int start = int.Parse (Console.ReadLine ());
  9.         int stop = int.Parse (Console.ReadLine ());
  10.  
  11.         for (int i = start; i >= end; i--)
  12.         {
  13.             if (i % 2 == 0 && i % 3 == 0)
  14.             {
  15.                 if (i == stop)
  16.                 {
  17.                     break;
  18.                 }
  19.  
  20.                 Console.Write ("{0} ", i);
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment