Advertisement
Guest User

Untitled

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