![]() |
|
#1
|
|||
|
|||
Troubles getting correct outputI want to add the numbers between x and y and not include x and y. So for example if x was 5 and y 9 the sum would be 21. When I run the program the output is 0. Hopefully someone can help me. I use the gcc compiler.
CPP / C++ / C Code:
Last edited by LuciWiz : 04-Nov-2009 at 02:16.
Reason: Please insert your C code between [cpp] & [/cpp] tags
|
|||
|
#2
|
|||
|
|||
Re: Troubles getting correct outputPlease TAKE THE TIME AND EFFORT TO USE THE C++ TAGS TO ENCLOSE THE CODE YOU SEND! ... read the guidelines.
If you used full warnings when you compile you program you might see: Code:
CPP / C++ / C Code:
I think you might rather do that section like this: CPP / C++ / C Code:
|
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| run script command on ns2.26 | newbie06 | Computer Software Forum - Linux | 65 | 19-Aug-2009 08:50 |
| getting associative array to output correct including missing value | bouton | MySQL / PHP Forum | 2 | 29-Sep-2006 03:42 |
| Bit stuffing | agnostos | C Programming Language | 17 | 12-Sep-2006 21:10 |
| No output from loop function | crystalattice | C++ Forum | 2 | 20-Dec-2004 21:39 |
| urgent: problem + output filters | jack | Apache Web Server Forum | 0 | 04-Feb-2004 23:32 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The