velocity

hey i have to write a code using s = v0t – 1/2gt2 , but am usure how to start the code any ideas
1
2
3
4
5
6
  float v0;
  float t;
  float half=1/2;
  float g2 = - (9.8*9.8);

  float s = v0 * t - half * g2;


This won't work if you just copy paste, have inputs for v0 and t.
Last edited on
Topic archived. No new replies allowed.