Palembang, 20 Maret 2011 08:50
import java.util.Scanner;
public class soal {
public static void main(String[]args)
{
Scanner input= new Scanner(System.in);
System.out.print("Masukkan Panjang =");
int pj= input.nextInt();
System.out.print("Masukkan Lebar =");
int lb= input.nextInt();
int ls = pj*lb;
System.out.println("Luas persegi panjang " + ls);
int kll = 2*(pj+lb);
System.out.println("Kll persegi panjang " + kll);
}
}
Tidak ada komentar:
Posting Komentar