标签:
1 import java.util.Scanner; 2 3 public class Solution 4 { 5 public static void main(String[] args) 6 { 7 Scanner input = new Scanner(System.in); 8 9 System.out.print("Enter the length of side: "); 10 double side = input.nextDouble(); 11 12 input.close(); 13 14 System.out.println(getArea(side)); 15 } 16 17 public static double getArea(double side) 18 { return 5 * side * side / ( 4 * Math.tan(Math.PI / 5)); } 19 }
标签:
原文地址:http://www.cnblogs.com/wood-python/p/5799152.html