Cara Menghitung Luas Lingkaran Di Java Via Scanner


import java.util.Scanner;

public class Soal_201 {

    public static void main(String[] args) {
        Scanner masukan = new Scanner(System.in);
        double jari, kel, luas;
        System.out.print("Masukan Nilai Variable Jari = ");
        jari = masukan.nextFloat();
        kel = (double) (2*3.14*jari);
        luas = (fdouble) (3.14*jari*jari);
        System.out.println();
        System.out.println("Hasil Perhitungan = ");
        System.out.println("Keliling = " + kel);
        System.out.println("luas = " + luas);
    }
}

0 Response to "Cara Menghitung Luas Lingkaran Di Java Via Scanner"

Posting Komentar

Dilarang komentar spam