Respuesta :

Answer:

int i,t = 0;

   i=0;  //initialize

   while(i<22){

       t = t + i;

           cout << t;

           i += 3;   //increment

   }

   cout << endl;

Explanation:

Loops are used to execute the part of the code again and again until the condition is not true.

In the programming, there are three loop

1. for loop

2. while loop

3. do-while loop

The syntax of for loop:

for(initialize; condition; increment/decrement){

   statement;

}

The syntax of while loop:

initialize;

while(condition){

   increment/decrement;

}

In the while, we change the location of initializing which comes before the start of while loop, then condition and inside the loop increment/decrement.