Tuesday, April 6, 2010

lingkaran

import javax.swing.*;
public class lingkaran {

public static void main(String[] args) {
String temp1 = JOptionPane.showInputDialog("Masukkan jari-jari : ");
int angka1 = Integer.parseInt(temp1);
int Luas = 2 * 3.14 * angka1 * angka1;
JOptionPane.showMessageDialog(null,"Luas Persegi = "+luas+);
System.exit(0);
}
}

No comments:

Post a Comment