Can someone help me start this program, completely new to c++ and no idea what I need to do.


Thanks to their innovative suits, human cannonballs can fly without air resistance, and thus their trajectory can be modeled using the following
π‘₯(𝑑) = 𝑣0 𝑑cosπœƒ
𝑦(𝑑)= 𝑣0 𝑑sinπœƒβˆ’1𝑔𝑑2 2
where π‘₯(𝑑) and 𝑦(𝑑) provides the position of a cannon ball at time t that is fired from point (0,0). g is the acceleration due to gravity (g = 9.81 m/s2).
Write an algorithm and a C++ program to determine if the human cannonball can make it safely through the hole in the wall. The inputs for the program are 𝑣0 , πœƒ, π‘₯, 𝐻1, π‘Žπ‘›π‘‘ 𝐻2.
ο‚· 𝑣0 must be between 0 and 100 m/s.
ο‚· πœƒ must be between 0 and 90 degrees.
ο‚· The distance π‘₯ between the cannon and the wall must be between 0 and 1000.
ο‚· H1 and H2 (0 < H1 < H2 < 1000) are the heights of the lower and upper edges of the
wall.
To pass safely, there has to be a vertical safety margin of 1m both below and above the point where the ball’s trajectory crosses the centerline of the wall. Your program output β€œSafe” if the cannon ball can safely make it through the wall. Otherwise, output β€œNot Safe”!
You must use two functions other than the main function in your program. The first function reads the user’s input. The second function calculates t and y(t) and return y(t).
You need to read and show something. See http://www.cplusplus.com/doc/tutorial/basic_io/

You need to test some relations. See http://www.cplusplus.com/doc/tutorial/control/
Topic archived. No new replies allowed.