Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem: Given the final velocity for two cars, calculate the time it takes for each car to finish the race, the average of their
Problem: Given the final velocity for two cars, calculate the time it takes for each car to finish the race, the average of their constant accelerations, and the time difference between the two cars (Car 1 - Car 2). All variables must be of the float data type. The race distance should be define as a constant of a value 500 ft. The output of your program needs to match EXACTLY with the provided example executions. Example Execution #1: Enter final velocity for Car 1 -> 76 Enter final velocity for Car 2 -> 81 Time for Car 1 to finish the race: Time for Car 2 to finish the race: Average acceleration: Time difference (Car 1 - Car 2): Example Execution #2: Enter final velocity for Car 1 -> 55 Enter final velocity for Car 2 -> 70 Time for Car 1 to finish the race: Time for Car 2 to finish the race: Average acceleration: Time difference (Car 1 - Car 2): -=-=- Example Execution #3: Enter final velocity for Car 1 -> 60 Enter final velocity for Car 2 -> 50 Time for Car 1 to finish the race: Time for Car 2 to finish the race: Average acceleration: Time difference (Car 1 - Car 2): Example Execution #4: Enter final velocity for Car 1 -> 70 Enter final velocity for Car 2 -> 75 Time for Car 1 to finish the race: Time for Car 2 to finish the race: Average acceleration: Time difference (Car 1 - Car 2): -=_=_=_=_ =-=- 13.16 seconds 12.35 seconds 6.17 ft/s^2 0.81 seconds 18.18 seconds 14.29 seconds 3.96 ft/s^2 3.90 seconds 16.67 seconds 20.00 seconds. 3.05 ft/s^2 -3.33 seconds =_=_=_=_=_=_ 14.29 seconds 13.33 seconds 5.26 ft/s^2 0.95 seconds -=- ==== Additional Requirements: 1. Add the homework assignment header file to the top of your program. A description of your program will need to be included in the assignment header. This particular header can be added to your file by entering hhw while in command mode in vi. 2. Each of the example executions provided for your reference represents a single execution of the program. Your program must accept input and produce output exactly as demonstrated in the example executions, do not add any "bonus" features not demonstrated in the example executions. Your program will be tested with the data seen in the example executions and an unknown number of additional tests making use of meaningful data. 3. Course standards prohibit the use of programming concepts beyond the material found in the first three chapters of the book, notes, and lectures. 4. A program MUST compile, be submitted through Vocareum as demonstrated during the lab #0 exercise, and submitted prior to the posted due date to be considered for credit. The C-file you submit must be named exactly: hw01.c, no variation is permitted. Course Programming and Documentation Standards Reminders: Indent all code found within the main function exactly two spaces. Place a single space between all operators and operands. Comment all variables to the right of each declaration. Declare only one variable per line. Notice that several programs (see program 2-9 on pages 74-75) in the programming text use a single line comment to indicate the start of the local declaration and executable statement sections of the main function. At no point during the semester should these two sections ever overlap. Select meaningful identifiers (names) for all variables in your program. O Do not single (or double) space the entire program, use blank lines when appropriate. There is no need to include example output with your submission.
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