Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var finalSector string
- fmt.Scanln(&finalSector)
- var rows, oddSeats, totalSeats int
- fmt.Scanln(&rows)
- fmt.Scanln(&oddSeats)
- for i := int('A'); i <= int(rune(finalSector[0])); i++ {
- for k := 1; k <= rows; k++ {
- currentSeats := oddSeats
- if k % 2 == 0 {
- currentSeats += 2
- }
- for o := int('a'); o < currentSeats + 97; o++ {
- fmt.Printf("%c%d%c\n", i, k, o)
- totalSeats++
- }
- }
- rows++
- }
- fmt.Println(totalSeats)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement