PLEASE post using the code /code tags!
Not sure what the question is here.. but just looking at your code there are some adjustments you should make.
first of all instead of using the expression
CODE
km_inicial - km_final
in several places.. what you are really wanting to do is use the RESULT of that expression, so store it in a variable and use the variable instead. Also shouldn't it be final - inicial ? assuming your talking about mile markers or some such..
CODE
float km_result = km_final - km_inicial;
.
.
.
cout << "Distancia en KM: " << km_result << "\n";
Also use it in your calculations .. it will make them simpler and less prone to bugs and errors.
same here .. final - inicial right?
CODE
float minutos_result = minutos_final - minutos_inicial;
float velocidad = km_result / minutos_result;
cout << "Velocidad : " << velocidad << "\n\n";
This will allow you to validate the data before entering it in your variable for errors such as entering the final time as the inicial time - resulting in a negative time and invalid velocity. Something you might want to check for.
Also, you may run into problems with Units.. The above calculations will give you velocity in Km/minute most people use Km/hour you can convert the minutes to hours by dividing it by 60 before you use it to divide the kilometers..that will give you kilometers per hour like on your car's dashboard, which is a more universal unit in your answer.
Man I hope Im not making some simple math mistakes here

Aet
This post has been edited by Aeternalis: 16 Oct, 2009 - 06:40 AM