Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
687 B
2
Indexable
Never
package luas_lingkaran;
import java.util.Scanner;
public class Luas_lingkaran {

    public static void main(String[] args) {
       final double phi=3.14;
       double L,K,r,d;
       Scanner keyboard = new Scanner(System.in);
       System.out.println("--------------------------");
       System.out.println(" Program Rumus Lingkatan");
       System.out.println("--------------------------");
       System.out.print("Masukan Jari-jari  = ");
       r = keyboard.nextDouble();
       d = 2 * r;
       L = phi * r * r;
       K = phi * d;
       
       System.out.println("Keliling Lingkaran = "+K);
       System.out.println("Luas Lingkaran     = "+L);
    }
}
Leave a Comment