Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace BarcodeGenerator
- {
- class Program
- {
- static void Main(string[] args)
- {
- int start = int.Parse(Console.ReadLine());
- int end = int.Parse(Console.ReadLine());
- int dFirst = start % 10;
- start /= 10;
- int cFirst = start % 10;
- start /= 10;
- int bFirst = start % 10;
- start /= 10;
- int aFirst = start % 10;
- int dSecond = end % 10;
- end /= 10;
- int cSecond = end % 10;
- end /= 10;
- int bSecond = end % 10;
- end /= 10;
- int aSecond = end % 10;
- for (int a = aFirst; a <= aSecond; a++)
- {
- for (int b = bFirst; b <= bSecond; b++)
- {
- for (int c = cFirst; c <= cSecond; c++)
- {
- for (int d = dFirst; d <= dSecond; d++)
- {
- if (a % 2 != 0 && b % 2 != 0 && c % 2 != 0 && d % 2 != 0)
- {
- Console.Write($"{a}{b}{c}{d} ");
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement