how to loop multiple quantities once ?

 

Hi all,


sorry for my basic programming skills and I apologies if I am asking a stupid question


For some reason I cannot loop over  multiple quantities in a single loop.


for example the code line

for(int i=limit;i>=0;i--)a[i]=Volume[i];


works fine but if I try for two variables 


for(int i=limit;i>=0;i--)a[i]=Volume[i], b[i]=Volume[i];

or

for(int i=limit;i>=0;i--)a[i]=Volume[i]; b[i]=Volume[i];



it gives a error on looping b[i]. How to solve this issue?


Regards

 
for(int i=limit;i>=0;i--){ a[i]=Volume[i]; b[i]=Volume[i]; }

Loop Operator for