Given the projectile's velocity (u), the projectile's angle (0), and the acceleration due to gravity (g); the maximum height of the projectile (H) can be determined using the following equation: u? sin? 0 H = 2g where the acceleration due to gravity, g = 9.81 m/s². Write a program in C that reads the values of projectile's velocity (u), the projectile's angle (0), and computes the maximum height of the projectile (H). The program should have the functions below: read_value – This function is used to read the values from the user. comp_height – This function is used to compute the maximum height of the projectile (H). display_height – This function is used to display the maximum height of the projectile (H) to the user.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter1: Fundamentals Of C++ Programming
Section1.3: Preliminary Three: Software Development
Problem 6E
icon
Related questions
Question

Please solve it in C language

Given the projectile's velocity (u), the projectile's angle (0), and the acceleration
due to gravity (g); the maximum height of the projectile (H) can be determined
using the following equation:
u? sin? 0
H =
2g
where the acceleration due to gravity, g = 9.81 m/s².
Write a program in C that reads the values of projectile's velocity (u), the
projectile's angle (0), and computes the maximum height of the projectile (H).
|The program should have the functions below:
read_value – This function is used to read the values from the user.
comp_height – This function is used to compute the maximum height of the
projectile (H).
display_height – This function is used to display the maximum height of the
projectile (H) to the user.
Transcribed Image Text:Given the projectile's velocity (u), the projectile's angle (0), and the acceleration due to gravity (g); the maximum height of the projectile (H) can be determined using the following equation: u? sin? 0 H = 2g where the acceleration due to gravity, g = 9.81 m/s². Write a program in C that reads the values of projectile's velocity (u), the projectile's angle (0), and computes the maximum height of the projectile (H). |The program should have the functions below: read_value – This function is used to read the values from the user. comp_height – This function is used to compute the maximum height of the projectile (H). display_height – This function is used to display the maximum height of the projectile (H) to the user.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr