Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var record, distance, secondsToMeter float64
- fmt.Scanln(&record)
- fmt.Scanln(&distance)
- fmt.Scanln(&secondsToMeter)
- var score = distance * secondsToMeter + float64(int(distance / 15)) * 12.5
- if (score >= record) {
- fmt.Printf("No, he failed! He was %.2f seconds slower.", score - record)
- } else {
- fmt.Printf("Yes, he succeeded! The new world record is %.2f seconds.", score)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement