c do-while code example
Example 1: c do while
do {
// code
} while(/* condition */);
Example 2: do-while in c
#include <stdio.h>
int main()
{
int j=0;
do
{
printf("Value of variable j is: %d\n", j);
j++;
}while (j<=3);
return 0;
}
do {
// code
} while(/* condition */);
#include <stdio.h>
int main()
{
int j=0;
do
{
printf("Value of variable j is: %d\n", j);
j++;
}while (j<=3);
return 0;
}