please don't use formula Un = a + (n-1)b, use looping
I tried to figure this out but i cannot find how to create pseudocode looping without formula
please don't use formula Un = a + (n-1)b, use looping
I tried to figure this out but i cannot find how to create pseudocode looping without formula
Given a and b, you can loop n-1 times and add b to the result.
In pseudocode:
u = a;
Loop n-1 times: // Note that if n=1, n-1 is 0, and the loop won't happen
u += b