/*************************************/
#include
#include
#include
static char Pass_w;
static char Chang;
static char new1;
static char new2;
FILE *fp;
/**************************************/
void Creat()
{
creat ("keyword"
;
fclose(fp);
}
/****************************************/
void save()
{int i;
if ((fp=fopen("keyword","wb"
)==NULL)
{printf("Cannot open file\n"
;
exit(0);
}
fwrite(Pass_w,strlen(Pass_w),1,fp);
fclose(fp);
}
/********************************************/
void red()
{
if ((fp=fopen("keyword","rb"
)==NULL)
{
printf("Cannot Open File \n"
;
exit(0);
}
fscanf(fp,"%s",Pass_w);
fclose(fp);
}
/***********************************/
void juage()
{
if ((fp=fopen("keyword","rb"
)==NULL)
{ creat();
loop:printf("Please Enter Your New Password:"
;
scanf("%s",new1);
printf("\nPlease Enter Your New Password Again:"
;
scanf("%s",new2);
while (strcmp(new1,new2)!=0)
{
printf ("\nYour Password is wrong!!!\nPlease Enter It Again: "
;
printf("\n"
;
goto loop;
}
strcpy(Pass_w,new1);
save();
}
}
/*************************************/
void star()
{int i=123;
for (i=0;i<=20;i++) {Chang=getch();
if (Chang=='\r'
{Chang='\0'; break;}
else putch('*'
;}
return ;
}
/*************************************/
void login()
{
printf("Please Enter Your Password: "
;
star();
while (strcmp(Chang,Pass_w)!=0)
{
printf ("\nYour Password is wrong!!!\nPlease Enter It Again: "
;
star();
printf("\n"
;
}
clrscr();
printf("\t ***************Login*****Successfull*************\n\t*\t\t Loading Windows \t\t*\n\t*************************************************"
;
}
/**************************************/
void gai()
{
char new1;
char new2;
printf("Please Enter Your Old Password:"
;
star();
printf("\n"
;
while (strcmp(Chang,Pass_w)!=0)
{
printf ("\nYour Password is wrong!!!\nPlease Enter It Again: "
;
star();
printf("\n"
;
}
loop:printf("Please Enter Your New Password:"
;
scanf("%s",new1);
printf("Please Enter Your New Password Again:"
;
scanf("%s",new2);
while (strcmp(new1,new2)!=0)
{
printf ("\nYour Password is wrong!!!\nPlease Enter It Again: "
;
printf("\n"
;
goto loop;
}
strcpy(Pass_w,new1);
creat();
save();
clrscr();
printf("\t******************Successfull********************\n\t*\t\t\t\t\t\t*\n\t*************************************************"
;}
/************************************/
void welcome ()
{static char wel={0};
printf("\t\tWELCOME TO BLUEEVIL'S PERSONAL COMPUTER"
;
loop:printf("\n\t\t.Login\t\t.Change The Password\nPlease Choose:\n\n"
;
wel=getch();
if (wel=='1'
login();
else
if (wel=='2'
{gai();goto loop;}
else
{printf("Please Choose Or \n"
;
goto loop;}
}
/**********************************************/
main()
{clrscr();
printf("<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>"
;
printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"
;
juage();
red();
welcome();
}
#include
#include
#include
static char Pass_w;
static char Chang;
static char new1;
static char new2;
FILE *fp;
/**************************************/
void Creat()
{
creat ("keyword"
;fclose(fp);
}
/****************************************/
void save()
{int i;
if ((fp=fopen("keyword","wb"
)==NULL){printf("Cannot open file\n"
;exit(0);
}
fwrite(Pass_w,strlen(Pass_w),1,fp);
fclose(fp);
}
/********************************************/
void red()
{
if ((fp=fopen("keyword","rb"
)==NULL){
printf("Cannot Open File \n"
;exit(0);
}
fscanf(fp,"%s",Pass_w);
fclose(fp);
}
/***********************************/
void juage()
{
if ((fp=fopen("keyword","rb"
)==NULL){ creat();
loop:printf("Please Enter Your New Password:"
;scanf("%s",new1);
printf("\nPlease Enter Your New Password Again:"
;scanf("%s",new2);
while (strcmp(new1,new2)!=0)
{
printf ("\nYour Password is wrong!!!\nPlease Enter It Again: "
;printf("\n"
;goto loop;
}
strcpy(Pass_w,new1);
save();
}
}
/*************************************/
void star()
{int i=123;
for (i=0;i<=20;i++) {Chang=getch();
if (Chang=='\r'

{Chang='\0'; break;}
else putch('*'
;}return ;
}
/*************************************/
void login()
{
printf("Please Enter Your Password: "
;star();
while (strcmp(Chang,Pass_w)!=0)
{
printf ("\nYour Password is wrong!!!\nPlease Enter It Again: "
;star();
printf("\n"
;}
clrscr();
printf("\t ***************Login*****Successfull*************\n\t*\t\t Loading Windows \t\t*\n\t*************************************************"
;}
/**************************************/
void gai()
{
char new1;
char new2;
printf("Please Enter Your Old Password:"
;star();
printf("\n"
;while (strcmp(Chang,Pass_w)!=0)
{
printf ("\nYour Password is wrong!!!\nPlease Enter It Again: "
;star();
printf("\n"
;}
loop:printf("Please Enter Your New Password:"
;scanf("%s",new1);
printf("Please Enter Your New Password Again:"
;scanf("%s",new2);
while (strcmp(new1,new2)!=0)
{
printf ("\nYour Password is wrong!!!\nPlease Enter It Again: "
;printf("\n"
;goto loop;
}
strcpy(Pass_w,new1);
creat();
save();
clrscr();
printf("\t******************Successfull********************\n\t*\t\t\t\t\t\t*\n\t*************************************************"
;}/************************************/
void welcome ()
{static char wel={0};
printf("\t\tWELCOME TO BLUEEVIL'S PERSONAL COMPUTER"
;loop:printf("\n\t\t.Login\t\t.Change The Password\nPlease Choose:\n\n"
;wel=getch();
if (wel=='1'

login();
else
if (wel=='2'
{gai();goto loop;}else
{printf("Please Choose Or \n"
;goto loop;}
}
/**********************************************/
main()
{clrscr();
printf("<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>"
;printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"
;juage();
red();
welcome();
}
