I'm not getting a logic to do the following problem in repetition structure:
I have a vector A with 1 element and another B with 30 elements. I wanted to subtract the vector A from each element of B so that this subtraction was accumulated, for example:
A=50
B=c(7,6,7,6,5,6,7,5,6,7)
#subtracao
50-7=43;
43-6=37;
37-7=30;
Could someone help?