Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace demo
- {
- 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 i = M; i > N; i--)
- {
- if(i % 2 == 0 && i % 3 == 0)
- {
- if(i == S)
- {
- break;
- }
- Console.WriteLine(i);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement