Rabu, 30 Maret 2011

Mencari Luas Segitiga (input dari keyboard)


import java.util.Scanner;
public class inputkeyboard{
public static void main (String []args){
Scanner input = new Scanner (System.in);
System.out.print("masukan jari jari :");
double r = input.nextDouble();
double phi = 3.14;
double luas = (phi*r*r);
System.out.print("Luasnya : "+ luas);


}
}

0 komentar:

Posting Komentar