14 lines
318 B
Java
14 lines
318 B
Java
import java.text.DecimalFormat;
|
|
|
|
public class Kreisflaeche {
|
|
public static DecimalFormat d = new DecimalFormat("0.00");
|
|
public static void main(String[] args) {
|
|
kreisflaecheB(2);
|
|
|
|
}
|
|
public static void kreisflaecheB( double r) {
|
|
System.out.println(d.format((Math.PI * Math.pow(r,2)) ));
|
|
|
|
}
|
|
|
|
} |