while do loop code example
Example 1: do whie loop
do{
----
} while(condition);
Example 2: do-while in c
#include
int main()
{
int j=0;
do
{
printf("Value of variable j is: %d\n", j);
j++;
}while (j<=3);
return 0;
}
Example 3: while loop
i = 0
while i < 6:
i += 1
if i == 3:
continue
print(i)
Example 4: while loop
var i=1;
while(i<=10){
document.write(i + "
");
i++;}
Example 5: while
while True:
print("A period of time.")
# "we chatted for a while"
print("Similar: time spell stretch stint")
print("at the same time; meanwhile.")
# "he starts to draw. talking for a while"
"""
CONJUCTION :D
"""
Example 6: whiel loop in C
while (testExpression)
{
// statements inside the body of the loop
}