Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var salary float64
- fmt.Scanln(&salary)
- var months int
- fmt.Scanln(&months)
- var minimalCosts float64
- fmt.Scanln(&minimalCosts)
- monthlySavings := salary * 0.70 - minimalCosts
- fmt.Printf("She can save %.2f%%\n%.2f", monthlySavings / salary * 100, monthlySavings * float64(months))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement