Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

If a solid object with mass ‘m’ was released from the ground with a vertically u

ID: 3795761 • Letter: I

Question

If a solid object with mass ‘m’ was released from the ground with a vertically upward velocity ‘v’, hence the kinetic energy it contains is (1/2)mv2 . The object reaches a maximum height ‘h’, before starting its downward travel. When the object is at its maximum height its kinetic enery becomes zero and the potential energy is at its maximum equals to ‘mgh’, where g is the gravitational acceleration approximately equals to 10ms-2 From the Energy conservation law (1/2) mv2 = mgh. A person needs to find a suitable initial velocity (user input) of an object such that it reaches a maximum height of ATLEAST 10m. If the maximum height it reaches is calculated to be less than 10 m the program should ask the user to re-enter the velocity value. Finally it should display a message when a sufficient velocity is entered. Complete the body of this program to achieve the above objective

#include<stdio.h>

#include <math.h>

int main()

{

double velocity=0;

double g = 10;

double height = 0;

do

{

printf("Enter the initial velocity value ");

scanf(________________________);

height = __________________________;

if(________________) printf("Velocity not sufficient to reach 10m");

}

while(______________________);

printf("Velocity %0.2lf is sufficient to reach 10m”,_______);

return 0;

}

Explanation / Answer

#include<stdio.h>
#include<math.h>

int main()
{
double velocity=0;
double g = 10;
double height = 0;

do
{
printf(" Enter the initial velocity value ");
scanf(" %lf ",&velocity);
height = (pow(velocity,2))/(2*g);
if(height <= 10)
printf("Velocity not sufficient to reach 10m");
}while(height <= 10);

printf("Velocity %0.2lf is sufficient to reach 10m",velocity);
return 0;
}

ouput:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote