Problem: Given the final velocity for two cars, calculate the time it takes for each car...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Related Book For
International Marketing And Export Management
ISBN: 9781292016924
8th Edition
Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr
Posted Date:
Students also viewed these algorithms questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Use the percentages in Figure 7.3 and the values in Figure 7.4 to answer the following questions: What percentage of SAT takers score between 500 and 600? Figure 7.3 Normal Curve Percentages, to Two...
-
An object is placed to the left of a convex mirror. In which direction will the image move when the object is moved farther to the left?
-
Use the normal distribution in Exercise 13. (a) What percent of the SAT total scores are less than 1300? (b) Out of 1000 randomly selected SAT total scores, about how many would you expect to be...
-
The following residuals and predicted values were obtained from an experiment that related yield of a chemical process \((y)\) to the initial concentration \((x)\) of a component (the time order of...
-
Value chain and classification of costs, pharmaceutical company Merck, a pharmaceutical company, incurs the following costs. a. Cost of redesigning blister packs to make drug containers more...
-
A passenger is on an airplane that is traveling 30 south of due west at 130m/s with respect to the air. The air is moving with a speed of36.0m/s with respect to the ground duenorth. Macmillan...
-
Consumer Research, owned by Chandler Robertson, is retained by large companies to test consumer reaction to new products. On January 31, 20X1, the firms worksheet showed the following adjustments...
-
One day in early November, Pam Berg, Manager of the ALLTEL Pavilion, was reviewing the operating results for the year just completed in preparation for the executive board meeting the following...
-
For a material requirements planning (MRP) system to determine what is required to make a product, what 3 documents are necessary? What information do each of these documents provide?
-
Elderly on a fixed income 2. Renters who live in a rent controlled apartment 3. People who are paying on a loan with adjustable interest rates 4. Banks who are collecting on loans with adjustable...
-
Briefly describe a derivative security. What is a futures contract? What is an option contract? Indicate the difference between a call option and a put option Option.
-
What are influence costs? Why do firms exist? Define decision management and decision control, and give an example of each.
-
Explain the Authentication List of employees and managers who work in the facility Employee login credentials to banking local area network Authorization Employees authorized to authenticate into the...
-
it is required to develop an integrated strategic plan for the establishment of an international university in Egypt in a manner that helps achieve Egypt Vision 2030 and the sustainable development...
-
Open Text Corporation provides a suite of business information software products. Exhibit 10-9 contains Note 10 from the companys 2013 annual report detailing long-term debt. Required: a. Open Text...
-
A number of alternative entry modes were identified in the chapter. Locate a company that uses indirect export and one using direct export. Describe their market entry strategies and determine why...
-
Using the variables shown in Table 5.5 develop operational measures of each, specify differential weights you feel are realistic, and apply these for a matrix analysis (such as shown in Figure 5.5)...
-
Boeing, the Chicago-based aerospace giant, is known for its commercial aircraft. The 93- year-old company is the no. 2 manufacturer in the world of such planes, behind Blagnac, France-based Airbus....
-
How are the identifiable assets and liabilities acquired in a business combination measured?
-
What is meant by deferred consideration and how is it accounted for?
-
Distinguish between a business combination and a non-business acquisition.
Study smarter with the SolutionInn App