Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var floorCount, flatFloorCount int
- var appendix string
- fmt.Scanln(&floorCount)
- fmt.Scanln(&flatFloorCount)
- for floor := floorCount; floor > 0; floor-- {
- if floor == floorCount {
- appendix = "L"
- } else if floor % 2 == 1 {
- appendix = "A"
- } else {
- appendix = "O"
- }
- for flatFloor := 0; flatFloor < flatFloorCount; flatFloor++ {
- fmt.Printf("%s%d%d ", appendix, floor, flatFloor)
- }
- fmt.Println()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement