Question: Answer the question by using C++ programme. A ball is thrown up in the air. Its height above the ground is given by the formula

 Answer the question by using C++ programme. A ball is thrown

Answer the question by using C++ programme.

A ball is thrown up in the air. Its height above the ground is given by the formula h +10t - t2 where t is the time in seconds after it is thrown. For example, at 1, 3 = Time t =0, h-3+0-0=3 Time t = 2, h = 3 + 20-4=19 When the ball hits the ground, h becomes negative. Write a fragment of C++ code to print out the height, h, once every second, starting a t = 0, and continuing until h becomes negative (meaning the ball has hit the ground). (Do not print the negative value.) Include all necessary data declarations and initializations. 516c (10 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!