Question: Submit the source code (your filename.c file) electronically and on paper as a hard copy. Include copy of the results as comment lines in the


Submit the source code (your filename.c file) electronically and on paper as a hard copy. Include copy of the results as comment lines in the completed program. All source code must be in a filename.c format. No other formats will be accepted. Phase I General Preprocessing items: Use mnemonic variables of 3 characters or more. Use void main (void) or void main in your program and leave off the return 0. Use double as the choice for all floating point values. Add heading items using as printf statement. Watch for instructions that specify a symbolic constant and assign that symbolic constant in all capital letters and using the #define. Thank you. The "xxxx or the (highlighted item) in a sample output will show locations that the computer program will transfer values Problem #1 Write a program that calculates the distance from the roof top to the ground for a free falling ball that is only influenced by gravity as it falls. The program should ask the user to input the height of the building. It is great weather on the roof, so the initial velocity is 0 meter second. This gives a distance equation shown below and a Velocity equation shown below. The program should assign the value of gravity as a symbolic constant. Gravity 9.8 l meters seconds-squared. The program must use the built in function(s), such as "pow" and or sqrt", from the Math header file (library) to calculate values. The program should calculate the time and print the answer to show 5 decimal place(s). The program should calculate the velocity and print the answer to show 4 decimal place(s). The program lets the user know how many valid tries and how many error tries were completed. The program continues until it is told to stop when -999 is entered. Use the given data and reproduce the sample output as a comment in your program. Please recall that: ravity00 time distance (gravity)(time) (use the following filename system: lastname gravity firstinitial.c) sample output problem3-Scenario 1 (Heading goes here) Calculate the time it would take for a golf ball to fall from a building from a given height. Enter the height of the building in meters or enter -999 to stop 99 Error, Error: The height must be greater than 0. You entered -99 Enter the height of the building in meters or enter -999 to stop -999 Thank you for using our program. You had 0 valid attempt(s) and 1 error attempt(s) Please come again Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
