title: coding a basic math formula
body: <p>I am trying to write a scanner program to ask the user for the length of a pendulum, L and then find the period of T in seconds. I am basing everything off of the formula below. </p>
  
  <p>T = 2pi*sqrt(L/G)</p>
  
  <p>where I have G as the named constant of 9.8 and L as the pendulum length. 
  Here is what I have so far. Can anyone help me out? 
  I am basically trying to solve for T when given L, and knowing G is 9.8.</p>
  
  <pre><code>{
  public static void main (String[] args) throws java.lang.Exception
  {
  import java.util.Scanner;
  Public class Math
  Scanner scan = new scanner(system.in);
  System.out.print("Type the length of your pendulum: ");
  double pendulum length = keyboard.nextdouble();
  final double G = 9.8 meters per second,
               pi = 3.14159;
  double powerTerm = Math.pow(pendulumLength, G, pi);
  double periodOfpendulum = 2*pi*Math.sqrt(L/G);
  System.out.println("The period of the pendulum is " +period+ " per second");
  scan.close();
  
  }
  }
  </code></pre>