is theres a way of adding one variable array?

im new to programming and have a school work. the programming problem is make a program that the user will continuously in put a number and if the user inputed 0 it will out put the sum of the inputted numbers. is there is a way of adding one array variable?
ex: sum=arr[5]+arr[5]..

or there is a way to increase a temporary storage without declaring it??

thanks.. :)
I don't think you need an array. Just add up each number that the user inputs into one variable.
how can i do that??
Try a Loop and exit it when Input == 0

Loop (exit when Input == 0)

   Input = input value

   Sum = Sum + Input

End loop

Print sum


You dont need an array to do what you said unless you mean storing all the inputs and then showing them + their sum..
Last edited on
thank you very much! it works.. like a miracle! thanks a lot!
Your welcome
Topic archived. No new replies allowed.