1import java.util.Scanner;
2public class AreaOfOctagon
3{
4 public static void main(String[] args)
5 {
6 Scanner sc = new Scanner(System.in);
7 System.out.println("Please enter length of side of octagon: ");
8 int side = sc.nextInt();
9 float area = (float) (2 * (1 + Math.sqrt(2)) * side * side);
10 System.out.println("Area of octagon is: " + area);
11 sc.close();
12 }
13}