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