konversi berat dari pound ke kilogram

Selamat pagi, kali ini saya akan membagikan cara konversi berat dari pound ke kilogram  pada pemrograman java.

Selamat mencoba

import java.util.Scanner;

public class PoundsToKilograms {

public static void main(String[] iriahus) {
final double POUND_TO_KG = 0.454;

@SuppressWarnings("resource")
Scanner s = new Scanner(System.in);

System.out.print("Enter a value for pound: ");
double pound = s.nextDouble();

double kg = pound * POUND_TO_KG;
System.out.println(pound + " pounds is " + kg + " kilograms");
}

}

Thank for visiting.

Subscribe to receive free email updates:

0 Response to "konversi berat dari pound ke kilogram"

Post a Comment