Building Java Programs : A Back to Basics Approach

Building Java Programs : A Back To Basics Approach

Authors: Stuart Reges, Marty Stepp
ISBN: 9780136091813
Edition: 2
Chapter: Primitive Data And Definite Loops
Exercise: Exercises
Question: 1

 

Question by Trueman on 01 Jan, 1970 at 12:00 AM

In physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initial position s_{0} , initial velocity v_{0}, and rate of acceleration a, is the following:

s = s_{0} + v_{0}t + \frac{1}{2}at^{2}

Write code to declare variables for s_{0}, v_{0}, a, and t, and then write the code to compute s on the basis of these values.

 

Sorry the answer is not available at the moment…

If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.

Spread the 'tradition of sharing'.