HW2.23

时间:2022-12-16 20:37:03

HW2.23

 import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);

         System.out.print("Enter v0, v1 and t: ");
         double v0 = input.nextDouble();
         double v1 = input.nextDouble();
         double t = input.nextDouble();

         input.close();

         double averageAcceleration = (v1 - v0) / t;
         System.out.println("The average acceleration is " + averageAcceleration);
     }
 }

相关文章