Computer Science, asked by samruddhi100, 1 year ago

write a java expression for UT + n^2/2

Answers

Answered by rachitsainionline
3

static double testcase11 = 12.5;

static double testcase12 = 4.4;

static double testcase13 = 10;

public static void main(String args[]){

DistanceTravelled testInstance= new DistanceTravelled();

double result = testInstance.distance(testcase11,testcase12,testcase13);

System.out.println(result);}

//write your code here

public double distance(double u, double a, double t){

double d = d = u*t + 1/2*a*t^2 ;

return d;


samruddhi100: thank you so very much
Similar questions