Kegiatan Java Menghitung Luas Lingkaran
run picture
/* Program Luas Lingkaran
Created by : Marvel Ricky Polii
*/
class Luaslingkaran {
public static void main (String [] args) {
double phi=3.14;
int jari = 4 ;
double luas,r;
r= jari/2;
luas=phi*r*r;
System.out.println ("luas = " +luas);
}
}
About:
1.Copy code in Notepad or Notepad++
2.Save as file in to Folder with name class "Luaslingkaran" and save as type Java Source File
3.Please run file in CMD with name Folder and file...!!
4.Plesae change you name to Underline text
5.Don't forget Put your Comment....!!