Advertisement
Spocoman

09. Yard Greening

Sep 12th, 2024
41
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 squareMeters float32
  6.     fmt.Scanln(&squareMeters)
  7.  
  8.     var price float32 = squareMeters * 7.61
  9.     var discount float32 = price * 0.18
  10.     var finalPrice float32 = price - discount
  11.    
  12.     fmt.Printf("The final price is: %f lv.\n", finalPrice)
  13.     fmt.Printf("The discount is: %f lv.\n", discount)
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement