14 lines
331 B
Plaintext
14 lines
331 B
Plaintext
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.round( (Math.PI * Math.pow(r,2)) )));
|
|
|
|
}
|
|
|
|
} |