Advertisement
Spocoman

01. Cinema

Sep 18th, 2024
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.47 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var screeningType string
  6.     fmt.Scanln(&screningType)
  7.    
  8.     var rows, columns int
  9.     fmt.Scanln(&town)
  10.     fmt.Scanln(&columns)
  11.    
  12.     var ticketPrice = 0.0
  13.      
  14.     if (screeningType == "Premiere") {
  15.         ticketPrice = 12.00
  16.     } else if (screeningType == "Normal") {
  17.         ticketPrice = 7.50
  18.     } else {
  19.         ticketPrice = 5.00
  20.     }
  21.  
  22.     fmt.Printf("%.2f leva\n", rows * columns * ticketPrice)
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement