Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Exam
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int m = int.Parse(Console.ReadLine());
- int s = int.Parse(Console.ReadLine());
- for (int currentHouse = m; currentHouse >= n; currentHouse--)
- {
- if (currentHouse % 2 == 0 && currentHouse % 3 == 0)
- {
- if (currentHouse == s)
- {
- break;
- }
- Console.Write(currentHouse + " ");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement