Thread: I need help storing numbers in loops

1. Senior Member
Join Date
Oct 2012
Posts
166
Rep Power
2

Re: I need help storing numbers in loops

What is it doing wrong?

2. Member
Join Date
Sep 2012
Posts
68
Rep Power
0

thanks man

3. Re: I need help storing numbers in loops

It's not summing the numbers. Try using 1 and 100 as the two inputs and see if you get 5050 as basic math and Carl Friedrich Gauss would say you should.

4. Member
Join Date
Sep 2012
Posts
68
Rep Power
0

Re: I need help storing numbers in loops

Actually, thanks to all of you that tried to help also

5. Senior Member
Join Date
Oct 2012
Posts
166
Rep Power
2

Re: I need help storing numbers in loops

no Thats not what i get my code works fine i get the numbers between 1 and 100 although it does reapeat the line"The numbers between 1 and 100 are" but i didnt fix that because i still want him to make little adjusments like that. And then it tells me the sum is 101.

6. Re: I need help storing numbers in loops

Originally Posted by Daryn
no Thats not what i get my code works fine i get the numbers between 1 and 100 although it does reapeat the line"The numbers between 1 and 100 are" but i didnt fix that because i still want him to make little adjusments like that. And then it tells me the sum is 101.
But 101 is not correct. Re-read the requirements of the program please:
... the user inputs 2 numbers and it tells you the numbers in between and then i have to find the sum of those numbers,...
and
Pretty much if you enter the two numbers 1 and 4 it needs to add the numbers 1,2,3,4 and im not sure how to do that. obviously the sum would be 10 but i dont know how to get it to add them up.
This means the sum includes each number in between.

7. Senior Member
Join Date
Oct 2012
Posts
166
Rep Power
2

Re: I need help storing numbers in loops

I still fixed some major errors in the code. All i did was misunderstand the requirements. That does not mean i gave bad advice. it also does not mean my code does not work. it work exactly as i had meant it to.

Page 2 of 2 First 12

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•