Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var minutes, seconds int
- fmt.Scanln(&minutes)
- fmt.Scanln(&seconds)
- control := minutes * 60 + seconds
- var lengthInMeters float64
- fmt.Scanln(&lengthInMeters)
- var secondsFor100Meters int
- fmt.Scanln(&secondsFor100Meters)
- time := lengthInMeters / 100 * float64(secondsFor100Meters) - lengthInMeters / 120 * 2.5
- if time <= float64(control) {
- fmt.Printf("Marin Bangiev won an Olympic quota!\nHis time is %.3f.\n", time)
- } else {
- fmt.Printf("No, Marin failed! He was %.3f second slower.", time - float64(control))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement