HW2.22

HW2.22

 import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);

         System.out.print("Enter the side: ");
         double side = input.nextDouble();

         input.close();

         double area = 3 * Math.pow(3, 0.5) * side * side / 2;

         System.out.println("The area of the hexagon is " + area);
     }
 }
上一篇:第七周笔记


下一篇:Treap(树堆)详解