Hi!
Hope everyone is fine. I am student of C++ and for intro to C++ subject ,I am doing some work on homework problem. I am facing a problem at the end of the code.
The assignment is here:
Starter
Work on designing simulator of a race car. The race car has to drive over a direct track which has 100 meters length. Having a speed of 0 m/s race car will begin the driving. Program will get three inputs which will be different, these inputs will have an effect on car speed.
Move:
The input will instruct the simulator aout X seconds to move the car at current speed. Where numerical value is X following string move directly.
Accelerate:
Following formula  newspeed = currentspeed+y where numerical value is y which follows accelerate move directly, input make current speed faster.
Decelerate: Following formula newspeed = currentpseed-z where numerical value is z which follows decelerate move directly, this input make lower current speed of race car.
Ending instruction:
https://www.theengineeringprojects.com/2019/12/how-to-include-bootstrap-in-asp-net-core.html
Using values of an acceleration or deceleration or value of time I have to input every command to make move. The format is below:
Accelerate 2 Move 5 , with Accelerate 1 Move 1 , having Decelerate 3 Accelerate 10 Move 20
Then the number of seconds gets output. But I am facing some issues in getting out second’s value to be the number of seconds that it took for 100 meter track.
Any one has any idea about this then let me know.
Thanks