Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c language EE 160 Homework 9 - Building-up a program... one layer at a time Background: An aircraft reaches a cruising speed of 180 m/s

image text in transcribedc language
EE 160 Homework 9 - Building-up a program... one layer at a time Background: An aircraft reaches a cruising speed of 180 m/s (meters per second), and the engine throttles are set so that the power level is increased. The aircraft then starts to accelerate but the faster it goes, the more aerodynamic drag it experiences (in proportion to the square of the air speed). Eventually, the aircraft reaches a new top speed when the thrust force equals the aerodynamic drag. The equations used to estimate the velocity and acceleration of the aircraft from the time that the throttle is reset until the plane reaches its new cruise speed is as follows: Velocity = 0.000001 time? -0.00488 time? +0.75795 time + 181.3566 Acceleration = 3 -0.000062 Velocity? Velocity is in units of m/s, Acceleration is in m/s? and time is in 's'. Instructions: 1. Basic pseudocode & flowchart - Write pseudocode to ask the user to enter a time value in seconds. Compute & display the velocity and acceleration for that given time value. Assume the user enters in a time value between 0 and 120 seconds. Complete the flowchart for the above. 2. Basic code - Write the code, compile and test it. Save and submit this C code as hw9a.c 3. Error-handling stage1 - Build on the existing code. Display an appropriate error message to the user if the input time is negative or above 120 seconds. Save this enhanced' C code, compile and run it to test it. Save and submit this C code as hw9b.c 4. Even more error handling - Display an appropriate error message to the user if a non-numerical input is entered (using isdigit() command). Write the code, compile and test it. Save and submit this C code as hw9c.c Use a "Test-dataset" - when all the above coding specs are complete, you can test the code for your hw9c.c using the following test dataset. Submit the run-output so that it can be graded: Time input of 0.23 seconds, Time input of 3.891555666 seconds, Time input of 25 seconds, Time input of 3 seconds, Time input of 12000 seconds, Time input of "abc

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions