Anda di halaman 1dari 1

import java.text.

DecimalFormat;
public class lat2 {
public static void main (String[] args) {
DecimalFormat df = new DecimalFormat(".##");
final double jr=3.14;
int r;
double kll,ls,akr;
r=7;
kll=r*jr*2;
ls=r*r*jr;

System.out.println("Latihan 2 : tentang lingksran ::");


System.out.println("jari-jari :"+r);
System.out.println("keliling :"+Math.floor(kll));
System.out.println("luas :"+Math.floor(ls));
System.out.println(Double.valueOf(df.format(ls)));
}
}