Advertisement
dydimitrov

Building

Nov 17th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 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 > 0; i--)
  13. {
  14. string typeOfFloor = "";
  15. if (i % 2 == 0)
  16. {
  17. typeOfFloor = "O";
  18. }
  19. else
  20. {
  21. typeOfFloor = "A";
  22. }
  23. if (i == floors)
  24. {
  25. typeOfFloor = "L";
  26. }
  27.  
  28. for (int j = 0; j < rooms; j++)
  29. {
  30. Console.Write($"{typeOfFloor}{i}{j} ");
  31. }
  32. Console.WriteLine();
  33. }
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement