Skip to main content
GameDev.net gamedev.net
🔒 Locked

Need help on a java problem

Started by Sean Frazier Feb 25, 2013 at 12:38 AM 2 replies 1.8k views
Original Post
Sean Frazier
Sean Frazier

I have a java problem for class and I Have no idea where to begin with it. the problem is

Write a while loop that accepts numbers from a user and sum only the numbers that
are odd? The loop quits if the given input number is -9999.
any help would be greatly appreciated
frob
frob
Homework is generally not allowed on the forums.

If you get stuck on a specific item of your homework you can post your code and look for a bug.

In this case you can start by reading in a number and then writing a loop. If you need more help then that you should probably talk with your instructor. That way your instructor will know what topics you know and which you are struggling on, and then he can tailor your class to suit your needs.
rip-off
rip-off

Moderator note: please do not post solutions. There is a middle ground for answering such questions, which mostly involves asking the OP for their code, and maybe pointing out bugs in their current implementation.

Also tips such as how to use a debugger or "printf debugging" would be acceptable.

rip-off
rip-off

@Sean12111

What code do you have at the moment?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.