| Description
an example of a do /
while example .
Code
//do while example
#include<stdio.h>
int main(void)
{
const int SECRET_CODE = 15;
int code;
do{
printf("Type the secret code
number to enter.\n");
scanf("%d", &code);
}while(code!=SECRET_CODE);
printf("Well done , you can now
enter\n");
return 0;
}
Information
tested using Visual
C++ 6
|