coding menghitung luas lingkaran
import java.util.Scanner;
public class Main {
public static void main (String[]args)
{
float p=3.14f,luas;
int r;
Scanner sc = new Scanner (System.in);
System.out.print("Masukan Nilai Jari-Jari anda =");
r=sc.nextInt();
luas=p*r*r;
System.out.println("Phi :"+p);
System.out.println("Jari-Jari :"+r);
System.out.println("Luas :"+luas);
}
}
semoga bermanfaat buat kawan-kawan...thanks good luck
0 komentar:
Posting Komentar