Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C programming language, with the test cases: Question 2 (15 marks) The upward velocity of a rocket can be computed by the following formula:
In C programming language, with the test cases:
Question 2 (15 marks) The upward velocity of a rocket can be computed by the following formula: gt mo-qt where v=upward velocity u the velocity at which fuel is expelled relative to the rocket, mo the initial mass of the rocket at timet-0, q = the fuel consumption rate, g = the downward acceleration of gravity (assumed constant 9.81 m/s, and t is time in seconds (s). Develop a program that presents the characteristics of four different rockets and requests to user to select one of the rockets to compute the velocity of the rocket for a given time. The program then displays results. The characteristics of the four rockets are u m (kg) q m/s /s Rocket 2000.0 150000.0 2700.0 Rocket 2 1596.0 300000.0 5367.0 Rocket 3 3267.0 543135.0 8900.0 Rocket 4 984.0 5468.089.5 Respect the following guidelines in creating your program. .Use a C structure: Define a structure type ROCKET which contains a member for each rocket characteristic, that is a member name for the rocket name, a member u (initial velocity, a member m0 (initial rocket mass), and a member q (rate of fuel consumption). In the function main, create an array of structure variables (of type ROCKET). The array should contain 4 elements. You can initialise the array in its declaration as follows o o ROCKET rockets [4] = "Rocket 1", 2000.0, 150000.0, 2700.0, { "Rocket 2" , 1596 . O , 300000 . O , 5367 . 0 } , {"Rocket 3", 3267.0, 543135.0, 8900.0, {"Rocket 4", 984.0, 5468.0, 89.5] o DO NOT include the speed v or the time t in your structure .Define a symbolic constant G as 9.81 (gravity acceleration). .The function main shall call the function selectRocket to display the contents of the array and ask the user to make a selection (i.e. using a number from 1 to 4). The address to the array isStep 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