title: Calling variables back to main
body: <p>I am supposed to find the area of a pentegon in a method and call it back to main so it can be printed to a <code>.txt</code> file. I got the everything to work in the main perfectly then when i tried break it up and put the area equation into a method i keep getting this error: 
  <code>The method pentegon(int) in the type ABhw4part4 is not applicable for the arguments ()</code></p>
  
  <p>At the line of code <code>double area = pentegon();</code></p>
  
  <p>(ABhw4part4 is the project name)</p>
  
  <p>something seems to go wrong when I try calling the answer to the equation back to the main</p>
  
  <p>I am having a similar problem with another problem involving strings and char</p>
  
  <p>I would be grateful for any help</p>
  
  <pre><code>import java.io.File;
  import java.io.BufferedReader;
  import java.io.FileReader;
  import java.io.IOException;
  import java.io.PrintWriter;
  import java.util.Scanner;
  
  public class ABhw4part4 {
  
  public static void main(String[] args) throws IOException {
  
  /* Write a method to calculate the area of a pentagon.
  
  Call this method from MAIN and print the result.
  Create a file and write all data to the file.
  
  Expected Output:
  
  Input the number of sides: 5
  Input the side: 6
  The area of the pentagon is 61.93718642120281
  Expected file content:
  Number of sides: 5
  Side: 6*/
  
  File myFile = new File("C://temp//ABhw4part4.txt");
  
  
  if (myFile.createNewFile() == true) {
  System.out.println("file is created");
  } else {
  System.out.println("file already exists");
  }
  PrintWriter writer = new PrintWriter(myFile);
  Scanner sides = new Scanner (System.in);
  int nos, sl;
  
  
  System.out.println("enter the number of sides");
  nos = sides.nextInt();
  writer.println(nos);
  
  System.out.println("enter the length of the sides");
  sl = sides.nextInt();
  writer.println(sl);
  
  
  double area = pentegon();
  System.out.println("area of the pentagon="+ area);
  writer.println(area);
  writer.close();
  
  }
  static double pentegon(int sl) {
  double A = (5 * Math.pow(sl, 2)) / (4 * Math.tan(Math.PI /5));
  return A;
  }
  }
  </code></pre>