Program Mencari Luas Lingkaran
import jeliot.io.*; public class luas_lingkaran { public void masukan() { System.out.print("masukkan r = "); r = Input.readInt(); } public void hitung_luas() { System.out.print("luas lingkaran = "); System.out.print(Luas=3.14*r*r); } private int r; private float Luas; public static void main() { luas_lingkaran x = new luas_lingkaran(); x.masukan(); x.hitung_luas(); } }
Program Mencari Volume Bola
import jeliot.io.*; public class volume_bola { public void masukan() { System.out.print("masukkan r = "); r = Input.readInt(); } public void hitung_volume() { System.out.print("volume bole = "); System.out.print(v=4/3*(3.14*r*r*r)); } private int r; private float v; public static void main() { volume_bola x = new volume_bole(); x.masukan(); x.hitung_volume(); } }
0 Response for the "Jeliot || Program Mencari Luas Lingkaran dan Volume Bola"
Post a Comment