Advertisement
Spocoman

08. Pet Shop

Sep 12th, 2024
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.36 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var dogFoodPrice float32 = 2.50
  6.     var catFoodPrice float32 = 4.00
  7.    
  8.     var dogFoodCount, catFoodCount float32
  9.     fmt.Scanln(&dogFoodCount)
  10.     fmt.Scanln(&catFoodCount)
  11.    
  12.     var totalPrice float32 = dogFoodPrice * dogFoodCount + catFoodPrice * catFoodCount
  13.    
  14.     fmt.Printf("%f lv.", totalPrice)
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement