kali ini saya akan berbagi tentang menghitung percepatan.
Selamat menikmati, .
import java.util.Scanner;
public class Acceleration {
public static void main(String[] iriahus) {
@SuppressWarnings("resource")
Scanner s = new Scanner(System.in);
System.out.print("Enter a value of v0, v1, and t: ");
double v0 = s.nextDouble();
double v1 = s.nextDouble();
double t = s.nextDouble();
double acceleration = (v1 - v0) / t;
System.out.println("The average acceleration is " + acceleration);
}
}
Thank for visiting. Semoga bermanfaat, . .
0 Response to " Acceleration"
Post a Comment