repl.it
@Peanut123/

Tester

Java

No description

fork
loading
Files
  • Main.java
  • Main.class
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
class Main {
  public static void main(String[] args) {
    int ns = 5;
    int sl = 5;
    System.out.println(getAreaOfBase(ns, sl));
    
  }

  public static double getAreaOfBase(int ns, int sl) {
		return (ns*Math.pow(sl, 2))/ (4*Math.tan(Math.PI)/ ns));
	}
}
Fetching token
?