i am trying to make a program in turbo C only that will print "Enter pin code::" then if the code is correct it will print "Login! Please Enter." and if it is wrong it will print "Access Denied." and "Try again? [Y/N]:" then if the user type Y it will loop back again to start and if the user type N the program will close.....
Can any one solve me this turbo c application? I need the codes i am trying it many time but did't work.?
void main(){
int pinNo;
int again = 1;
do{
printf("Enter Pin :");
scanf("%d", %26amp;pinNo);
if(pinNo != 1234567){
printf("Access Denied : Try Again ( 1 = Y / 0 = N ) : ");
scanf("%d", again);
}
else{ again = 0; }
}while(again == 1);// Loop till Wrong %26amp; Willing
//Put Code here for what will happen if PinNo is Right
}// END OF MAIN
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment