Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var sh:int
- var sm: int
- var st:int
- var eh:int
- var em: int
- var et:int
- var difhour:real
- var kph:real
- var distance:real
- put "What is your total distance?"
- get distance
- put "What hour did you start with?"
- get sh
- put "What minute did you start with?"
- get sm
- st:= sh*60+sm
- put "What hour did you finish with?"
- get eh
- put "What minute did you finish with?"
- get em
- et:=eh*60+em
- difhour:=(et+st)/60
- kph:=distance/difhour
- put "The automobile travels at ", kph," kilometres per hour"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement