![]() |
|
#1
|
|||
|
|||
Please help with this C++ programThis program is supposed to get two numbers as an input. Then it should find and print all the odd numbers. b) it should print the sum of all even numbers.
I have been trying for hours, but my while loops dont work as they are supposed to. Anyone can debug?????? CPP / C++ / C Code:
Last edited by LuciWiz : 26-Jul-2005 at 10:01.
Reason: Please insert your C++ code between [c++] & [/c++] tags; edited title
|
|
#2
|
||||
|
||||
|
Sure can, if you read the guidelines. If all caps is considered shouting, is all bold considered yelling?
First while loop seems fine. Second is commented out so it won't be executed. __________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
|
#3
|
|||
|
|||
...Sorry about the bold, I actually just used ArialBold font, -- bolded without intention.
|
|
#4
|
||||
|
||||
|
Quote:
Now what is it you need help with? And did you read the guidelines? __________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
|
#5
|
|||
|
|||
C++ while loopIf user inputs 1 and 10 (for example) i need it to display 1 3 5 7 9 20 but it is not adding corect numbers Can you help please, i feel I am so close to the solution, but just stuck. here is revised program now: CPP / C++ / C Code:
Last edited by LuciWiz : 26-Jul-2005 at 00:56.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|
#6
|
||||
|
||||
|
Quote:
Read at least guideline #1 __________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
|
#7
|
|||
|
|||
|
i am sorry but I don't know what are you talking about. i read the guidelines and i also followed the rule!
|
|
#8
|
||||
|
||||
|
Quote:
This is a direct quote from the sticky thread (number 5566, nice and easy to remember). 1: When posting code, to help us read your posts please
You want your code to end up looking like this. CPP / C++ / C Code:
If you still don't see, hit reply to this post and look at the code tags. Liberally use the Preview Post button. Mark I'm getting out of here, don't want to be around for a drive by ... __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#9
|
|||
|
|||
unbelievableI got the solution! Anyhow, i hope you had fun lecturing new forum user!!!
|
|
#10
|
||||
|
||||
|
Quote:
Hi amazingme001. I am sorry you didn't get the help you were looking for sooner. This is, however, not the members' fault. They are all a bunch of great people, ready to help you in their time. The only thing we require is for new members such as yourself to obey the few rules we have on the Forum. Since you were directed several times to the Guidelines, I don't know what else to say. Be more careful next time, use code tags for your code, and the help will come. Kind regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
Recent GIDBlog
US Elections and the ?Voter?s Responsibility? by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 08:44 |
| Type casts ? | kai85 | C++ Forum | 12 | 23-Jun-2005 13:04 |
| [TUTORIAL] Calling an external program in C (Linux) | dsmith | C Programming Language | 4 | 22-Apr-2005 14:30 |
| fltk-2.0 cvs | Plumb | FLTK Forum | 20 | 13-Nov-2004 08:10 |
| Need help with a C program (Long) | McFury | C Programming Language | 3 | 29-Apr-2004 21:06 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The