Read everything before doing anything.
Do Exercise 3 on page 34:
Save the source file in the form lastname_firstname_average.cpp. Thus, if your name is Fred Bloggs, you would name the file bloggs_fred_average.cpp. Do not put blanks in your file names, and make sure you use all lowercase. If your file is not named properly, it will not be graded.
Attach the .cpp file to an email and send it to the instructor. You must put the words CIT020 C++ Assignment Vars Part 1 in the subject line of your email, or it will not be graded.
In some games, characters run through a maze and jump to reach objects that are worth points. The height to which a character can jump is based upon the initial speed and a “power factor” that increases that speed.
Your program will ask the user for a character’s speed in dots per second and a power factor in the range 1-2. It will calculate the maximum height of the jump and display it.
You will save the program in a file whose name is in the form lastname_firstname_jump.cpp. Thus, if your name is Suze Jerusalem, your file should be named jerusalem_suze_jump.cpp. If your file is not named properly, it will not be graded.
Here is information to help you write your program.
All of your variables should be
double (even the height). Here is an example of what
running the program might look like. User input is
bold and red. Your output does not have
to look exactly like this, but it must convey the same information.
Enter initial speed in dots/second: 60 Enter power factor (1 to 2): 1.3 Your jump height is 101.4 dots.
Attach the .cpp file to an email and send it to the instructor. You must put the words CIT020 C++ Assignment Vars Part 2 in the subject line of your email, or it will not be graded.