Hello, i need some help with several questions guys. Stuck
Input
Valid user input can be in the following formats:
Distance: in miles or kilometers, e.g. 100mi or 100km
Speed: miles per hour or kilometers per hour, e.g. 100m/h or 100km/h
Time: in hours and minutes, e.g. 1hr.20min, 1:20, or any integer which defaults to that number of hours, as in 3 (is 3 hours).
Any combination of the above formats can be entered on the command line and in any order.
Distance and speed can be entered as any decimal number, e.g. 50.8793mi, 78.405km/h
2 arguments will be entered at a command line and i have to calculate the third one based on those 2 arguments. I have no problem working with distance and speed, but
PROBLEM: how can i get the time converted to minutes if any of these formats are entered: e.g. 1hr.20min, 1:20, or any integer which defaults to that number of hours, as in 3 (is 3 hours).
Any help would br appreciated guys, thanks.