package Luas_bufereder;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Luas_bufereder {
public static void main (String[] args) {
BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
String input = "";
try{
double pi = 3.14;
int a;
int d;
System.out.print("masukkan jari-jari:");
input = dataIn.readLine();
a = Integer.parseInt(input);
double luaslingkaran = pi*(a*a);
double keliling = pi*2*a;
System.out.println("Luas lingkaran : " + luaslingkaran);
System.out.println("keliling lingkaran" +keliling);
}catch(IOException ioe){}
}
}
MASUKKAN TOMBOL TWEET DISINI
|
|
0 komentar:
Posting Komentar