#include <stdio.h>
#include <conio.h>
#include <string.h>
void Password (void);
main()
{
Password();
}
void Password(void)
{
char Passwordin[20];
gotoxy(30,4);printf("Password Identification");
gotoxy(17,8);printf("\t\tPlease enter password : ");
scanf("%s",Passwordin);
//check if user entered correct password dcampbell using strcmp
if(strcmp(Passwordin,"dodon")==0)
{
gotoxy(17,10);printf("Correct Password ");
getch();
}
else
{
// if password incorrect Password function recalled until correct Password entered
gotoxy(17,10);printf("\t\tincorrect password\n");
getch();
Password();
}
}
The above code when u enter an incorrect password, the program halts and wont give me the option of re-entering a password - any ideas? also how would you be able to have ***** appear on screen as the password being entered instead of the text appearing on screen? cheers