Jump to content

  • Log In with Google      Sign In   
  • Create Account


Need help on a java problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Sean12111   Members   -  Reputation: 119

Like
0Likes
Like

Posted 24 February 2013 - 06:38 PM

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


Sponsor:

#2 frob   Moderators   -  Reputation: 18874

Like
0Likes
Like

Posted 24 February 2013 - 08:23 PM

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.
Check out my personal indie blog at bryanwagstaff.com.

#3 rip-off   Moderators   -  Reputation: 7660

Like
0Likes
Like

Posted 25 February 2013 - 04:44 AM

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.



#4 rip-off   Moderators   -  Reputation: 7660

Like
0Likes
Like

Posted 25 February 2013 - 04:44 AM

@Sean12111

 

What code do you have at the moment?






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS