Problem is:-
"Many treadmills output the speed of treadmill in miles per hour on console, but most of runners think of speed in terms of a pace. A common pace is the number of minutes and seconds per mile instead of mph. So, write a program that starts with quantity in mph and coverts the quantity into minutes and seconds per mile."
So all the steps are in my mind except the formula. Which formula we will use to convert mph into miles per minutes and second?
So, what's the factor: hour -> minute / hour -> second?
Next consideration. obviously: 1 mile per hour (slow) != 1 mile per minute (fast)
So how to apply (* or /) the above factor so that the right expression is also slow?
Mean
First, if the treadmill is 6.5. miles per hour, divide 60 by 6.5, and we will get 9.23
second, Then we will multiply .23 with 60 to get miles per minute and second which will be 13.8
Now at next step I am confused. For example if input for mph variable is 6.5 and dividing 60/6.5 we will 9.23 answer now for sec variable how to multiply only .23 with 60?
Mean how to separate .23 from 9 in C++?
I am using book "Problem Solving With C++ (6th edition) by Walter Savitch" and facing above problem at chapter 2 but I download book in pdf with 9th edition and I am amazing to find that in 9th edition at chapter 2 this problem is not give.
I think its printing problem that this problem comes before its time mean it is very hard to solve so may be this problem is not for beginners.
What do you think why?
I think its printing problem that this problem comes before its time mean it is very hard to solve so may be this problem is not for beginners.
What do you think why?