knikolov98

Untitled

Oct 15th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Building
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int floors = int.Parse(Console.ReadLine());
  10.             int rooms = int.Parse(Console.ReadLine());
  11.  
  12.             for (int i = floors; i >= 1; i--)
  13.             {
  14.                 Console.WriteLine();
  15.  
  16.                 for (int j = 0; j < rooms; j++)
  17.                 {
  18.                     if (i == floors)
  19.                     {
  20.                         Console.Write($"L{i}{j} ");
  21.                     }
  22.  
  23.                     else if (i % 2 == 0)
  24.                     {
  25.                         Console.Write($"O{i}{j} ");
  26.                     }
  27.  
  28.                     else
  29.                     {
  30.                         Console.Write($"A{i}{j} ");
  31.                        
  32.                     }
  33.  
  34.                 }
  35.             }
  36.         }
  37.     }
  38. }
Add Comment
Please, Sign In to add comment