Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- const USDToBGN float64 = 1.57
- var processorPrice, videoPrice, ramPrice float64
- fmt.Scanln(&processorPrice)
- fmt.Scanln(&videoPrice)
- fmt.Scanln(&ramPrice)
- var ramCount int
- fmt.Scanln(&ramCount)
- var discount float64
- fmt.Scanln(&discount)
- sum := ((processorPrice + videoPrice) * (1 - discount) + ramPrice * float64(ramCount)) * USDToBGN
- fmt.Printf("Money needed - %.2f leva.\n", sum)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement