Latihan Java Class - Luas Segitiga


package Segitiga;
import java.util.Scanner;

/**
*
* @author ROUF
*/
public class LuasSegitiga {
public static void main(String[] args) {
Scanner input= new Scanner(System.in);

System.out.print("Masukkan bilangan pertama: ");
double bilangan1 = input.nextInt();

System.out.print("Masukkan bilangan kedua: ");
double bilangan2 = input.nextInt();

double hasil=bilangan1*bilangan2;

System.out.print("Hasil perkalian: " + hasil);
System.out.println("");
System.out.print("Hasil perkalian: " +(int)hasil);
System.out.println("");
}
}


0 Responses So Far: