Mile To Kilometer

Assalamualaikum, . .
Kali ini saya membagikan cara konversi Mile Ke Kilometer pada pemrograman java. . .
Selamat mencoba, . .

public class MileToKilometer {

public static void main(String[] iriahus) {
final double MILE_TO_KM = 1.609;

System.out.println("Miles\t\tKilometers");
System.out.println("--------------------------");

for (int i = 0; i < 200; i++) {
System.out.printf((i + 1) + "\t\t%10.3f\n", (i + 1) * MILE_TO_KM);
}
}

}

Semoga bermanfaat, . .

Subscribe to receive free email updates:

0 Response to "Mile To Kilometer"

Post a Comment