do while syntax code example
Example 1: do whie loop
do{
----
} while(condition);
Example 2: while loop
i = 0
while i < 6:
i += 1
if i == 3:
continue
print(i)
Example 3: while loop
var i=1;
while(i<=10){
document.write(i + "<br>");
i++;}
Example 4: c make loop
#include <stdio.h>
int main()
{
int i = 1;
while (i <= 5)
{
printf("%d\n", i);
++i;
}
return 0;
}
Example 5: while loop
#include<stdio.h>
int main()
{
printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
int i = 0;
printf("\nPrinting numbers using while loop from 0 to 9\n\n");
while(i<10)
{
printf("%d\n",i);
i++;
}
printf("\n\n\t\t\tCoding is Fun !\n\n\n");
return 0;
}
Example 6: whiel loop in C
while (testExpression)
{
}