-
Notifications
You must be signed in to change notification settings - Fork 0
/
PAS.C
86 lines (83 loc) · 1.5 KB
/
PAS.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<dos.h>
int main()
{
char name[20];
char name2[20];
char pas[6];
char pas2[6];
int j=0,k=0;
clrscr();
gotoxy(22,10);
printf("ENTER NAME : ");
gets(name);
gotoxy(22,11);
printf("ENTER PASWARD : ");
gets(pas);
/*
while((pas[i]=getch())!=13)
{
printf("*");
sound(1000);
i++;
delay(100);
nosound();
}
pas[i]='\0';
printf("\nNAME : %s",name);
printf("\nPASWARD : %s",pas);
printf("\n__________________________________\n");
printf("__________________________________\n");
*/
delay(100);
l:
fflush(stdout);
clrscr();
gotoxy(22,10);
printf("ENTER NAME : ");
while((name2[k]=getch())!=13)
{
printf("*");
sound(1000);
delay(100);
k++;
nosound();
}
name2[k]='\0';
gotoxy(22,11);
printf("ENTER PASWARD : ");
while((pas2[j]=getch())!=13)
{
printf("*");
sound(1000);
j++;
delay(100);
nosound();
}
pas2[j]='\0';
/*
printf("\n-------------------------------");
printf(" \n------------------------------");
printf("\nNAME : %s",name2);
printf("\nPASWARD : %s",pas2);
//if(strcmp(pas,pas2)==0)
*/
if((strcmp(name,name2)==0) && (strcmp(pas,pas2)==0))
{
clrscr();
gotoxy(22,10);
printf("\n SUCCESSFULLY LOGINED...\n THANK YOU");
}
else
{ clrscr();
gotoxy(22,10);
printf(" INCORRECT USER NAME\n OR \n INCORRECT PASWORD ");
// getch();
delay(1000);
goto l;
}
getch();
return 0;
}