Advertisement
fbinnzhivko

Stop Number

Jul 18th, 2016
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         int n = int.Parse(Console.ReadLine());
  7.         int m = int.Parse(Console.ReadLine());
  8.         int s = int.Parse(Console.ReadLine());
  9.  
  10.         for (int i = m; i >= n; i--)
  11.         {          
  12.             if (i % 6 == 0)
  13.             {
  14.                 if (i == s)
  15.                 {
  16.                     break;
  17.                 }
  18.                 Console.Write("{0} ", i);
  19.             }
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement