public static double tetragonSquare(Double tetragonSide) {
System.out.println("Tetragon Square = " + Math.pow(tetragonSide, 2));
return Math.pow(tetragonSide, 2);
}
public static double CircleSquare(Double radius) {
System.out.println("CircleSquare = " + Math.PI * Math.pow(radius, 2));
return Math.PI * Math.pow(radius, 2);
}
public static double circleSquare4(Double radius) {
var fourCirclesSqure = CircleSquare(radius) * 4;
System.out.println("Square of 4 Circles = " + fourCirclesSqure);
return fourCirclesSqure;
}
public static void result() {
var scanner = new Scanner(System.in);
System.out.print("Pls write side of tetragon: ");
var tetragonSide = scanner.nextDouble();
System.out.println("Pls write value radius: ");
var radius = scanner.nextDouble();
if (tetragonSquare(tetragonSide) / circleSquare4(radius) >= 1) {
System.out.println("4 круга не достаточно");
}
else {
// дальше сам
}
Одим из способов.