Pangil_aku_Andi

Don't Give Up in Life …

Mencari Luas dan Keliling


//Mencari Luas dan Keliling
import java.util.Scanner;
class rumus{
public static void main (String[]args){
Scanner input = new Scanner(System.in);
int a,b,c,d;
System.out.print(“Panjang: “);
a=input.nextInt();
System.out.print(“Lebar: “);
b=input.nextInt();
c = a*b;
d = 2*(a+b);
System.out.println(“LUas Persegi Panjang :”+c);
System.out.println(“Keliling Persegi Panjang :”+d);
}
}
save as dengan “rumus.java”

2 responses to “Mencari Luas dan Keliling

  1. maz ipan August 14, 2011 at 1:59 am

    link kamu udah aku pasang di blog saya…
    semoga bisa membantu…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: