Mastery19 Use of loops with “while

using a do{}while is simple. the function of this is repeating whatever is inside the “do{—-}whiile”  WHILE the condition inside the “while” turns false. example: 

       cin>>num1;

do

{

sum = sum + 1;

num2 = sum + num2;

}while(sum<num1);

is going to repeat whatever is inside the do{}while (LOOP) while the condition presented inside the parenthesis is true

CC BY 4.0 Mastery19 Use of loops with “while by luis armando is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.