Advertisement
Spocoman

Fish Land

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