0

Hi Good evening guys can someone teach me this problem because I'm beginner of coding

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

24th Oct 2022, 11:38 AM
Billy puppet
Billy puppet - avatar
2 ответов
+ 2
Create a function that takes a single parameter which is the distance Return the (distance divided by 40) multiplied by 60 since you want it as minutes
24th Oct 2022, 11:57 AM
Toni Isotalo
Toni Isotalo - avatar
+ 1
Thank You sir ☺️
24th Oct 2022, 12:00 PM
Billy puppet
Billy puppet - avatar