Advertisement
koksibg

Stop_Number

Jul 24th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. sing System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Stop_Number
  8. {
  9.     class Stop_Number
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int N = int.Parse(Console.ReadLine());
  14.             int M = int.Parse(Console.ReadLine());
  15.             int S = int.Parse(Console.ReadLine());
  16.             for (int i = M; i >= N; i--)
  17.             {
  18.                 if (i % 2 == 0 && i % 3 == 0)
  19.                     if (i == S) break;
  20.                 Console.Write(i + " ");
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement