The syntax of Do-While Loop is:
while (if the condition is true)
In Do-While Loop the statements are evaluated first and then the conditions are checked.
In While Loop if the condition fails to satisfy then the statements will not be executed however in Do-While Loop, it will be evaluated once even if the condition fails.
/* Program to illustrate the do while loop*/
#include < stdio.h >
printf(“Input Y or N”);
while(inchar!=’y’ && inchar != ‘n’);
printf(“you pressed u\n”);
printf(“You pressed n\n”);
Urgenthomework helped me with finance homework problems and taught math portion of my course as well. Initially, I used a tutor that taught me math course I felt that as if I was not getting the help I needed. With the help of Urgenthomework, I got precisely where I was weak: