Advertisement
NadyaMisheva

zadacha 5 test

Dec 9th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System;
  2.                    
  3. public class Program
  4. {
  5.     public static void Main()
  6.     {
  7.         int a = int.Parse(Console.ReadLine());
  8.         int b = int.Parse(Console.ReadLine());
  9.         for(char A = (char)a; A <= 'z' ; A++)
  10.         {
  11.             for(char B = (char)b; B <= 'z' ; B++)
  12.             {
  13.                 for(int x = 1; x <=9; x++)
  14.                 {
  15.                     for(int y = 1; y <=9; y++)
  16.                     {
  17.                         if(x + y == 9 && B > A)
  18.                         {
  19.                             Console.Write("{0}{1}{2}{3} ", A, B, x, y );
  20.                         }
  21.                     }
  22.                 }
  23.             }
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement