Advertisement
Spocoman

04. Vegetable Market

Sep 15th, 2024
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.34 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var vegetablesBg, fruitsBg, vegetablesKg, fruitsKg float64
  6.     fmt.Scanln(&vegetablesBg)
  7.     fmt.Scanln(&fruitsBg)
  8.     fmt.Scanln(&vegetablesKg)
  9.     fmt.Scanln(&fruitsKg)
  10.    
  11.     var result = (vegetablesBg * vegetablesKg + fruitsBg * fruitsKg) / 1.94
  12.    
  13.     fmt.Printf("%.2f\n", result)
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement