Advertisement
Spocoman

06. Food Delivery

Sep 15th, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.58 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var chickenMenuPrice = 10.35
  6.     var fishMenuPrice = 12.40
  7.     var veganMenuPrice = 8.15
  8.     var delivery = 2.50
  9.    
  10.     var chickenMenuCount, fishMenuCount, veganMenuCount float64
  11.     fmt.Scanln(&chickenMenuCount)
  12.     fmt.Scanln(&fishMenuCount)
  13.     fmt.Scanln(&veganMenuCount)
  14.  
  15.     var menuPrice = chickenMenuCount * chickenMenuPrice + fishMenuCount * fishMenuPrice + veganMenuCount * veganMenuPrice
  16.     var dessertPrice = menuPrice / 5
  17.     var totalPrice = menuPrice + dessertPrice + delivery
  18.    
  19.     fmt.Println(totalPrice)
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement