0
How can I make 2 different operations with the same values?
For example introduce 5 then 5 and finally I obtain 5+5=10 and 5-5=0
1 Answer
+ 3
You can use a loop to do this. Let's say the loop goes from 0 to 1 (2 iterations); you then place a check in the loop body (e.g. using `if` statement), if loop counter equals 0 you add the two numbers, if it was 1, you subtract the two numbers instead.