-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpaasword_manager.c
179 lines (143 loc) · 2.99 KB
/
paasword_manager.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <conio.h>
#include<time.h>
#include<ctype.h>
#include <time.h>
#include <windows.h>
#include <process.h>
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
int length;
int bend_no;
int len;
char key;
void record();
void load();
int life;
void Delay(long double);
void Move();
void Food();
int Score();
void Print();
void gotoxy(int x, int y);
void GotoXY(int x,int y);
void Bend();
void Boarder();
void Down();
void Left();
void Up();
void Right();
void ExitGame();
int Scoreonly();
struct coordinate{
int x;
int y;
int direction;
};
typedef struct coordinate coordinate;
coordinate head, bend[500],food,body[30];
int i,j;
int main_exit;
void menu();
void close();
struct date{
int month,day,year;
};
struct {
char name[60];
int acc_no,age;
char address[60];
char citizenship[15];
double phone;
char acc_type[10];
float amt;
struct date dob;
struct date deposit;
struct date withdraw;
}add,upd,check,rem,transaction;
float interest(float t,float amount,int rate);
void fordelay(int j);
void new_acc();
void view_list();
void edit(void);
void transact(void);
void erase(void);
void see(void);
void close(void);
void menu(void);
int main()
{
char pass[10],password[10]="subham";
int i=0;
char key;
int ch;
printf("1)Snake Game\n2)Bank Management System\n");
scanf("%d",&ch);
switch(ch)
{
case 1:
Print();
system("cls");
load();
length=5;
head.x=25;
head.y=20;
head.direction=RIGHT;
Boarder();
Food(); //to generate food coordinates initially
life=3; //number of extra lives
bend[0]=head;
Move(); //initialing initial bend coordinate
return 0;
case 2:
printf("\n\n\t\tEnter the password to login:");
scanf("%s",pass);
/*do
{
//if (pass[i]!=13&&pass[i]!=8)
{
printf("*");
pass[i]=getch();
i++;
}
}while (pass[i]!=13);
pass[10]='\0';*/
if (strcmp(pass,password)==0)
{printf("\n\nPassword Match!\nLOADING");
for(i=0;i<=6;i++)
{
fordelay(100000000);
printf(".");
}
system("cls");
menu();
}
else
{ printf("\n\nWrong password!!\a\a\a");
login_try:
printf("\nEnter 1 to try again and 0 to exit:");
scanf("%d",&main_exit);
if (main_exit==1)
{
system("cls");
main();
}
else if (main_exit==0)
{
system("cls");
close();}
else
{printf("\nInvalid!");
fordelay(1000000000);
system("cls");
goto login_try;}
}
return 0;
default : printf("Invalid Selection");
break;
}
}