Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Building
- {
- class Program
- {
- static void Main(string[] args)
- {
- int floor = int.Parse(Console.ReadLine());
- int room = int.Parse(Console.ReadLine());
- for (int i = floor; i >= 1; i--)
- {
- for (int j = 0; j < room; j++)
- {
- if (i == floor)
- {
- if (j == room-1)
- {
- Console.WriteLine($"L{i}{j} ");
- }
- else
- {
- Console.Write($"L{i}{j} ");
- }
- }
- else if (i % 2 == 0)
- {
- if (j == room-1)
- {
- Console.WriteLine($"O{i}{j} ");
- }
- else
- {
- Console.Write($"O{i}{j} ");
- }
- }
- else
- {
- if (j == room-1)
- {
- Console.WriteLine($"A{i}{j} ");
- }
- else
- {
- Console.Write($"A{i}{j} ");
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment