Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- public static void Main()
- {
- int end = int.Parse(Console.ReadLine());
- int start = int.Parse(Console.ReadLine());
- int stop = int.Parse(Console.ReadLine());
- string result = "";
- for(int i = start; i >= end; i--)
- {
- if(i % 2 == 0 && i % 3 == 0)
- {
- if(i == stop)
- {
- break;
- }
- result = i + " ";
- Console.Write(result);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement