Jump to content
  • Advertisement
Sign in to follow this  
Sean Frazier

Need help on a java problem

This topic is 2064 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!