Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ this is all thats is provided in the question Weather balloons are used to gather temperature and pressure data at various altitudes in the

C++
image text in transcribed
image text in transcribed
this is all thats is provided in the question
Weather balloons are used to gather temperature and pressure data at various altitudes in the re. The balloon rises because the density of the helium inside the balloon is less than the density of the surrounding air outside the balloon. As the balloon rises, the surrounding air becomes less dense, and thus the balloon's ascent slows until it reaches a point of equilibrium. During the day, sunlight warms the helium trapped inside the balloon, which causes the helium to expand and become less dense; thus, the balloon will rise higher. During the night, however, the helium in the balloon cools and becomes more dense; thus, the balloon will descend to a lower altitude. The next day, the sun heats the helium again and the balloon rises. Over time, this process generates a set of altitude measurements that can be approximated with a polynomial equation. Assume that the following polynomial representation represents the altitude or height in meters during the first 48 hours following the launch of a weather balloon: h(t) = -0.124 + 121 - 380t? +4100t +220, where the units of t are in hours. The corresponding polynomial model for the velocity in meters/hr of the weather balloon is: v(t) = -0.48t + 361 - 760t + 4100. Write a program that will print a table of the time, altitude, and the velocity for this weather balloon using units of meters and meters per second. Let the user enter the start time, the increment in time between lines of the table, and the ending time, where all the time values must be less than 48 hours. After your table is printed out, also print the peak altitude and its corresponding time. Specifications: The format for your output table numbers should be to use 2 values after the decimal point for the time and velocity, but only 1 value after the decimal point for the altitude. To format your table, use the "\t" (tab) character. You must use a while loop to solve the problem correctly, since floating point numbers are being used. HINT: You may use the math library and the pow() function if you want to. For example, to calculate ', use pow (t, 4). assuming that your variable for time is called t. Be sure to use include the math library in your preprocessor directives. As an example, if you execute the program with the following underlined inputs, the output will be: -> hw11.o Welcome to the Weather Balloon Altitude and Velocity Program. Enter the Balloon's Starting Time: 1 Enter the Time Increment: 2.2 Enter the Balloon's Ending Time: 10 Weather Balloon Information Time (hr) Altitude (m) Velocity (m/s) 1.00 3.20 5.40 7.60 9.80 3951.9 9829.4 13066.7 14298.6 14092.3 0.94 0.56 0.27 0.05 -0.10 Peak Altitude: 14298.6 (m) Corresponding Time: 7.60 hr If your program does not follow these specifications properly, the Grader Program will not accept your submission. Develop your I/O diagram and pseudocode, debug your code, and submit to the Grader Program

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago