Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace fifth
- {
- class Program
- {
- static void Main(string[] args)
- {
- int start = int.Parse(Console.ReadLine());
- int end = int.Parse(Console.ReadLine());
- int firstStart = start / 1000;
- int secondStart = (start / 100) % 10;
- int thirdStart = (start / 10) % 10;
- int fourthStart = start % 10;
- int firstEnd = end / 1000;
- int secondEnd = (end / 100) % 10;
- int thirdEnd = (end / 10) % 10;
- int fourthEnd = end % 10;
- for (int i = firstStart; i <= firstEnd; i++)
- {
- for (int j = secondStart; j <= secondEnd; j++)
- {
- for (int k = thirdStart; k <= thirdEnd; k++)
- {
- for (int l = fourthStart; l <= fourthEnd; l++)
- {
- if (i % 2!= 0 && j % 2 != 0 && k %2 != 0 && l % 2 !=0 )
- {
- Console.Write("{0}{1}{2}{3} ", i, j ,k, l);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement