Computer Science, asked by minakshijaiswal34, 6 months ago

Write a program in java to calculate and display the distance by taking initial

velocity, acceleration and time covered as input.
V= u + a t​

Answers

Answered by imtiyazallam
0

Answer:

import java.util.*;

public class Velocity{

public static void main(String[] args){

float u,a,t,v;

Scanner sc = new Scanner(System.in);

System.out.print("Enter velocity: ");

u=sc.nextFloat();

System.out.print("Enter acceleration: ");

a=sc.nextFloat();

System.out.print("Enter time covered: ");

t=sc.nextFloat();

v = u+a*t;

system.out.println("Initial velocity="+v);

}

}

Similar questions