Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var mackerelPrice, spratPrice, bonitoFishKg, saffronKg, shellKg float64
- fmt.Scanln(&mackerelPrice)
- fmt.Scanln(&spratPrice)
- fmt.Scanln(&bonitoFishKg)
- fmt.Scanln(&saffronKg)
- fmt.Scanln(&shellKg)
- var bonitoFishSum = bonitoFishKg * mackerelPrice * 1.60
- var saffronSum = saffronKg * spratPrice * 1.80
- var shellSum = shellKg * 7.50
- var sum = bonitoFishSum + saffronSum + shellSum
- fmt.Printf("%.2f\n", sum)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement