Forum: Java Nov 20th, 2008 |
| Replies: 15 Views: 775 All you need to do is in the last for loop, make it go till j < i instead of j <=i. |
Forum: Java Nov 19th, 2008 |
| Replies: 15 Views: 775 where does it add one at? |
Forum: Java Nov 19th, 2008 |
| Replies: 15 Views: 775 you could try subtracting one |
Forum: Java Nov 19th, 2008 |
| Replies: 15 Views: 775 |
Forum: Java Nov 19th, 2008 |
| Replies: 15 Views: 775 As for the line beteen the print statement and the input field, I'm not sure on that one. I'm not sure that there is a way to fix that. |
Forum: Java Nov 19th, 2008 |
| Replies: 15 Views: 775 Hey,
So you only need to declare Scanner once, and just use that one throughout the rest. So like in the beggining when you have Scanner input = new Scanner(System.in); just use input throughout... |
Forum: Java Nov 19th, 2008 |
| Replies: 15 Views: 775 Scanner 2ndinput = new Scanner(System.in); here you can not use a number as the first lette in the variable name. It can be the last though, or in the middle just not the first.
Also, the error... |
Forum: Java Nov 19th, 2008 |
| Replies: 15 Views: 775 First, in your first while() loop while ( p !=0 && 1 <= p <= 2000) You have to restate p every time so it should look like
while(p != 0 && 1 <= p && p <= 2000) |