Write a program to calculate the trajectory of a cannon ball (we use a watermelon). The program must ask the user for the initial velocity and initial trajectory angle then ask the user what they want to calculate, Time of flight or Max. height or horizontal range. Calculate what user wants and display it.
Formulas:
User input:
The initial velocity valid rage is 10 to 1000 m/s
The initial angle valid range is 1 to 89 degrees
Requirement
Must implement functions for each of the followings:
- Calculating peak height. Must not print the result in the function
- Calculating max range. Must not print the result in the function
- Calculating travel time. Must not print the result in the function
- Check for valid input from the user and give the user chance to reenter the data 3 times, after 3 incorrect tries give user a notice and exit the program. You can do some print statements in this function depending on how you design your code
General requirement
1- Following comments must be the first lines of your source code
/* ———————————————–
Submitted By: <Your Name>
Homework Number: <whichever homework you are doing>
Credit to:
<Name or names>
Submitted On: <Date>
By submitting this program with my name,
I affirm that the creation and modification
of this program is primarily my own work.
———————————————— */
2- Next few line of your source code must be comments describing what this program is supposed to do.
3- The first output (display) must be your name
4- The source code file must include comments documenting the design.
5- Indentation and spacing should be used to make the program readable.
Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.
Use the order calculator below and get started! Contact our live support team for any assistance or inquiry.
[order_calculator]