0
how can we do 2 things using a loop
suppose i have to make a program to add 2 number for first 5 times and then next 5 times i have to subtract 2 numbers. how can i do this using loop?
1 Resposta
+ 6
for (int k = 0; k < 10; ++k){
if (k <= 4)
// ADD
else
// SUBTRACT
}