Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Character storage in simple plastic variables
Character storage in simple plastic variables
Do {

c = 0;

Scanf("%d ",& flag);

printf(" \ n ");

if(flag==0||flag== 1)

c = 0;

//Avoid infinite loops here. .....

other

{

c = 1;

Break;

}

//Jump out of the loop when the value of c is 1.

if(c== 1)

{printf("/* Sorry, what you entered does not meet the requirements, \ n ");

Printf ("Please re-enter" 0 "or"1"*/\ n" as required);

}

printf("%d\n ",c);

printf("%d\n ",flag);

} while(c = = 1);