Advertisement
Spocoman

06. Fishland

Sep 15th, 2024
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.50 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var mackerelPrice, spratPrice, bonitoFishKg, saffronKg, shellKg float64
  6.     fmt.Scanln(&mackerelPrice)
  7.     fmt.Scanln(&spratPrice)
  8.     fmt.Scanln(&bonitoFishKg)
  9.     fmt.Scanln(&saffronKg)
  10.     fmt.Scanln(&shellKg)
  11.    
  12.     var bonitoFishSum = bonitoFishKg * mackerelPrice * 1.60
  13.     var saffronSum = saffronKg * spratPrice * 1.80
  14.     var shellSum = shellKg * 7.50
  15.     var sum = bonitoFishSum + saffronSum + shellSum
  16.    
  17.     fmt.Printf("%.2f\n", sum)
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement