View Single Post
Old 10-06-2004, 09:00 PM   #7 (permalink)
oblar
Über-Rookie
 
Location: No longer, D.C
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..
oblar is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76