Computer Science, asked by aritrakayal29, 1 month ago

The final velocity of a vehicle ca be calculated by using formula: v2=u2+2as; where u=initial velocity, v=final velocity, a=acceleration, s=distance covered. Write a program in Java to calculate and display the final velocity by taking initial velocity, acceleration and distance covered as inputs

write accurately ​

Answers

Answered by rohitthorat1029
3

Answer:

Explanation:

import java.util.*;

class Test

{

public static void main()

{

Scanner sc = new Scanner(System.in);

System.out.println ("Enter the initial velocity: ");

int u = sc.nextInt();

System.out.println ("Enter the acceleration: ");

int a = sc.nextInt();

System.out.println ("Enter the distance covered: ");

int s = sc.nextInt();

int v = Math.sqrt((Math.pow(u, 2) + 2*a*s));

System.out.print ("\nThe final velocity is: "+v);

}

}

Similar questions