# I need help storing numbers in loops

Show 40 post(s) from this thread on one page
Page 2 of 2 First 12
• 10-10-2012, 05:37 AM
Daryn
Re: I need help storing numbers in loops
What is it doing wrong?
• 10-10-2012, 05:39 AM
MrPosotive
Re: I need help storing numbers in loops
thanks man
• 10-10-2012, 05:39 AM
Fubarable
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.
• 10-10-2012, 05:44 AM
MrPosotive
Re: I need help storing numbers in loops
Actually, thanks to all of you that tried to help also
• 10-10-2012, 05:46 AM
Daryn
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.
• 10-10-2012, 05:50 AM
Fubarable
Re: I need help storing numbers in loops
Quote:

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:
Quote:

... 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
Quote:

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.
• 10-10-2012, 05:55 AM
Daryn
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.
Show 40 post(s) from this thread on one page
Page 2 of 2 First 12