Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "math"
- )
- func main() {
- var videosPrice, cablesPrice int
- fmt.Scanln(&videosPrice)
- fmt.Scanln(&cablesPrice)
- var powerPerDay, profitPerDay float64
- fmt.Scanln(&powerPerDay)
- fmt.Scanln(&profitPerDay)
- computerPrice := (videosPrice + cablesPrice) * 13 + 1000
- cashbackDays := math.Ceil(float64(computerPrice) / ((profitPerDay - powerPerDay) * 13))
- fmt.Printf("%d\n%d\n", computerPrice, int(cashbackDays))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement