What is it doing wrong?

Printable View

- 10-10-2012, 05:37 AMDarynRe: I need help storing numbers in loops
What is it doing wrong?

- 10-10-2012, 05:39 AMMrPosotiveRe: I need help storing numbers in loops
thanks man

- 10-10-2012, 05:39 AMFubarableRe: 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 AMMrPosotiveRe: I need help storing numbers in loops
Actually, thanks to all of you that tried to help also

- 10-10-2012, 05:46 AMDarynRe: 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 AMFubarableRe: I need help storing numbers in loops
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,...

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.

- 10-10-2012, 05:55 AMDarynRe: 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.