Glad you figured it out.
Type: Posts; User: Norm
Glad you figured it out.
This is how you will have to do it:
You need to use an input that you know what the output should be. Then add printlns at every point in your code where that input will cause a condition to be true...
Look at the API doc for the class and see.
Java Platform SE 6
How would a merchant do it? Round up or down?
If you have an interactive debugger, you need to learn how to use it. Your code has too many variables and if statements with long conditions to easily debug.
You need to use an input that you...
If the program should have said something different, that means that your logic and testing of values is wrong. To figure out what the program is doing, you need to add lots of printlns to show the...
Can you translate that into something about your program and its output.
For example: the programs prints out 213412 but it should print out 233.
The rest of your post makes no sense to me.
Copy and Post the console from when you execute the program and add comments to it describing what is wrong and show what it should be.
To copy the contents of the command prompt window:
Click on...
Copy and Post the console from when you execute the program and add comments to it describing what is wrong and show what it should be.
To copy the contents of the command prompt window:
Click on...
Please edit your code and wrap it in code tags. See: BB Code List - Java Programming Forums
or Go Advanced and use the #icon
Are you showing off your program or do you have a question?