Files
java-schule/5/Kreisflaeche.~ava
Mykola Fesenko 899a05907b backup
2025-07-29 08:08:23 +02:00

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)) )));
}
}