title: Projectile Motion Program: What's wrong with this program?
body: <p>My below program does not give any values other than 0.00. </p>
  
  <p>I'm new to coding, and I'm trying to apply functions. This program compiles and runs, but does not give correct values. </p>
  
  <p>Any constructive comments?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  #include &lt;stdlib.h&gt;
  #define g 9.81
  
  float MaxH(float Vi, float theta);
  float ToF(float Vi, float theta);
  float range(float Vi, float theta);
  
  int main()
  {
      float H=0.00, t=0.00, R=0.00, Vi, theta;
  
      printf("Enter initial velocity in m/s\n");
      scanf("%f", &amp;Vi);
  
      printf("Enter angle Theta\n");
      scanf("%f", &amp;theta);
  
      float MaxH(float Vi, float theta);
      printf("The maximum projectile height is %3.2fm\n", H);
  
      float ToF(float Vi, float theta);
      printf("The time of flight is %3.2fs\n ", t);
  
      float range(float Vi, float theta);
      printf("The horizontal range of projectile is %3.2fm\n", R);
  
      return 0;
  }
  
  
  float MaxH(float Vi, float theta)
  {
      float H;
  
      H = (Vi*Vi*sin(theta)*sin(theta))/(2*g);
  
      return H;
  }
  
  float ToF(float Vi, float theta)
  {
      float t;
  
      t = (2*Vi*sin(theta))/g;
  
      return t;
  }
  
  float range(float Vi, float theta)
  {
      float R;
  
      R = (Vi*Vi*sin(2*theta))/g;
  
      return R;
  }
  </code></pre>