Computer Science, asked by pratyushnandan3214, 25 days ago

Write the java statement for the following.

x= ut +½ at2​

Answers

Answered by raylaladilip
1

Answer:

(u*t) + (1/2*a*t*t)

THANK YOU

Answered by BrainlyProgrammer
6

Java Expression for:

  •  \sf \:  \large \: x = ut +  \dfrac{1}{2} a {t}^{2}

Answer:-

There are two ways to write this as java Expression:-

  1. double x= u * t + (1/2)* a* t* t;
  2. double x= u * t + (1/2)* a* (Math.pow(t,2));

Note:-

  • double x means value of x will return in decimal form.. you can also write float x
  • to get the result in integer format, you can use long,short or int instead of double and float.

Always remember:-

  • Math.pow() returns double data type value.
  • (t* t) can also be written as Math.pow(t,2)

Similar questions