- 1
How to solve it??
You need to plan a road trip. You are traveling at an average speed of 40 miles an hour. Given a distance in miles as input (the code to take input is already present), output to the console the time it will take you to cover it in minutes. Sample Input: 150 Sample Output: 225
1 ответ
+ 3
time = distance / speed
Speed is given
Take distance as an input and use above formula
Remeber speed is given in hour so you need to multiply with 60 to get result in minutes
So time = (speed / 40) * 60