Hamed Haghjo wrote:
C:\Users\user\Documents\JCreator Pro\MyProjects\pocketbooks\src\pocketbooks.java:17: error: 'else' without 'if'
}else if (amountofbooks >=50); {
^
Hamed Haghjo wrote:Sorry can't find no errors in this code, but it wont run properly though. The general output gives me default configuration text.
Hamed Haghjo wrote:Sorry can't find no errors in this code, but it wont run properly though. The general output gives me default configuration text.
Hamed Haghjo wrote:But can someone simplyfy my work and tell me or write on my code if a user says he buys 42 books how much it will cost him.
Hamed Haghjo wrote:I will try to wait for someone to do it for me, it shouldn't take toooooo long. And I'd highly appreciate anyone who took their time. For me it'd take hours, I would have been stuck on this site not getting anywhere.
I learn from having a problem and seeing the solution, that's how I workIt's like answers on a mathematical question, if I see how it gets its solution then I'll generalize the method and learn from it.
There are worse crimes than burning books. One of them is not reading them. Ray Bradbury
All things are lawful, but not all things are profitable.
Campbell Ritchie wrote:I would write the else ifs differentlyThere is a subtle difference from what you wrote.
Or you have the ranges 0...49, 50...99, 100...199 and 200...∞Carey Brown wrote:. . . You'd have to use "<=" in your case.
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|