numerator = p*(1-(math.pow(R/100, n+1)))
that is the line that needs a ; after it
as far as the math.pow.. You almost have it. math is a class, therefore needs to be capitalized. Math.pow(R/100, n+1)
edit: i didn't mention another way to get input.. You should be able to get input through the use of InputStreamReader and BufferedReader
// Set up input stream for console use
InputStreamReader iStream = new InputStreamReader(System.in);
BufferedReader buffer = new BufferedReader(iStream);
System.out.println("What do you want to enter?"
String userInput = buffer.readLine();
you can also just use System.in.read(); which should read a character at a time (as integers). There are lots of ways to do user input. (The bufferedReader requires you to import java.io.*;
Last edited by oblar; 10-06-2004 at 09:08 PM..
|