Advertisement
fbinnzhivko

Untitled

Jul 18th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 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 (s % 6 == 0 || i == s)
  15.                 {
  16.                     break;
  17.  
  18.                 }
  19.                 Console.Write("{0} ", i);
  20.             }
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement