Question
Early C++ programming Calculate Rocket Velocity In this project, you are going to continue working on types and variables but add on our new topic
Early C++ programming
Calculate Rocket Velocity
In this project, you are going to continue working on types and variables but add on our new topic of if-else statements (branching). A quick summary of this project is:
The user of the program will provide a single console input for a time (we will ignore units). Your code will calculate the rocket velocity at that time using this formula. To define the rocket velocity formula you will need to make use of branching, which is being introduced this week in lecture and in lab. Finally, you should provide a console output with the results from the calculation.
In other words, cout a request to the user:
Input time:
Then, the user should enter a single number (the time) that will be your input variable (using cin). Choose a data type that makes sense.
Console output has two options. If the inputted time is negative, the output should be:
Input time must be positive
If the inputted time is positive or 0, the output should be (e.g. if time = 5):
Rocket velocity: 2501112-5t 0st 10 10 st 20 v(t)50t +2(t -20)2 20
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started