#include<stdio.h>
#include<conio.h>
#include<iostream.h>
#include<fstream.h>
#include<string.h>
#include<time.h>
#include<process.h>
#include<dos.h>
#include<graphics.h>
#include<stdlib.h>
//password
int password(char max[])
{
char ch[100];
int i=0;
cout<<endl<<endl;
cout<<"t"<<"t"<<" "<<" * Password : ";
while(1)
{
int m=getch();
if(m==13)
{
break;
}
else if(m==8)
{
if(i==0)
{
}
else
{
printf("b");
printf(" ");
printf("b");
i--;
}
}
else
{
ch[i]=m;
i++;
printf("*");
}
}
ch[i]=NULL;
int m=strcmp(ch,max);
return m;
}
int admin(char max1[])
{
char ch1[100];
int j=0;
time_t t=time(NULL);
struct tm tm=*localtime(&t);
int y1=tm.tm_year+1900;
int m=tm.tm_mon+1;
int d=tm.tm_mday;
int h=tm.tm_hour;
int mi=tm.tm_min;
int s=tm.tm_sec;
textcolor(CYAN);
cout<<"t"<<"DATE ::
"<<d<<"/"<<m<<"/"<<y1<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
cout<<"t"<<"BRRANCH CODE :: 2830"<<endl;
cout<<"t"<<"BRANCH NAME :: ASHOKVIHAR"<<endl;
cout<<"t"<<"BRANCH ADDRESS :: D-1/234,ASHOK
VIHAR,DELHI-110052"<<endl<<endl<<endl;
textcolor(CYAN);
int f=22;
textcolor(RED);
for(int yi=0;yi<=42;yi++)
{
gotoxy(f,10);
cprintf("
");
f++;
gotoxy(f,25);
cprintf("
");
}
int fo=0;
textcolor(GREEN+BLINK);
for(int yiw=0;yiw<=79;yiw++)
{
gotoxy(fo,3);
cprintf("*");
fo++;
gotoxy(fo,7);
cprintf("*");
}
{
gotoxy(26,12);
textcolor(BLUE);
cprintf(" **** U S E R L O G I N **** nnnn");
}
gotoxy(40,40);
textcolor(YELLOW);
sleep(1);
cout<<"t"<<"t"<<"t"<<"t "<<" * User Name :
";
while(1)
{
int n=getch();
if(n==13)
{
break;
}
else if(n==8)
{
if(j==0)
{
}
else
{
printf("b");
printf(" ");
printf("b");
j--;
}
}
else
{
ch1[j]=n;
j++;
printf("*");
}
}
ch1[j]=NULL;
int n=strcmp(ch1,max1);
return n;
}
//////////////////////////////////////////////////////////////////////////////////////////
int password1(char max[])
{
char ch[100];
int i=0;
cout<<endl<<endl;
cout<<"t"<<"t"<<" "<<" Password : ";
while(1)
{
int m=getch();
if(m==13)
{
break;
}
else if(m==8)
{
if(i==0)
{
}
else
{
printf("b");
printf(" ");
printf("b");
i--;
}
}
else
{
ch[i]=m;
i++;
printf("*");
}
}
ch[i]=NULL;
int m=strcmp(ch,max);
return m;
}
int admin1(char max1[])
{
char ch1[100];
int j=0;
time_t t=time(NULL);
struct tm tm=*localtime(&t);
int y1=tm.tm_year+1900;
int m=tm.tm_mon+1;
int d=tm.tm_mday;
int h=tm.tm_hour;
int mi=tm.tm_min;
int s=tm.tm_sec;
cout<<"t"<<"DATE ::
"<<d<<"/"<<m<<"/"<<y1<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
cout<<"t"<<"BRRANCH CODE :: 2830"<<endl;
cout<<"t"<<"BRANCH NAME :: ASHOKVIHAR"<<endl;
cout<<"t"<<"BRANCH ADDRESS :: D-1/234,ASHOK
VIHAR,DELHI-110052"<<endl<<endl<<endl;
int f=22;
textcolor(RED);
for(int yi=0;yi<=39;yi++)
{
gotoxy(f,10);
cprintf("
");
f++;
gotoxy(f,25);
cprintf("
");
}
int fo=0;
textcolor(LIGHTGREEN+BLINK);
for(int yiw=0;yiw<=60;yiw++)
{
gotoxy(fo,3);
cprintf("*");
fo++;
gotoxy(fo,6);
cprintf("*");
}
{
gotoxy(26,12);
textcolor(BLUE);
cprintf(" ****A D M I N L O G I N **** nnnn");
}
gotoxy(40,40);
textcolor(YELLOW);
sleep(1);
cout<<"t"<<"t"<<"t"<<"t "<<" * User Name :
";
while(1)
{
int n=getch();
if(n==13)
{
break;
}
else if(n==8)
{
if(j==0)
{
}
else
{
printf("b");
printf(" ");
printf("b");
j--;
}
}
else
{
ch1[j]=n;
j++;
printf("*");
}
}
ch1[j]=NULL;
int n=strcmp(ch1,max1);
return n;
}
/////////////////////////////////////////////////////////////////////////////////////////////
///////
//BANK
class Bank
{
long int balance,acc,with,dep;
int y,m,d,h,mi,s;
long int accn;
char f;
char phone[30];
char name[100];
char mname[100];
char lname[100];
char add[100];
public:
void enter(int);
int getaccn()
{
return accn;
}
void deposite()
{
time_t t=time(NULL);
struct tm tm=*localtime(&t);
y=tm.tm_year+1900;
m=tm.tm_mon+1;
d=tm.tm_mday;
cout<<"initial-[cheque(s)/cash(c)]"<<" : ";cin>>f;
cout<<"t"<<" * Amount :: ";cin>>dep;cout<<endl;
balance=balance+dep;
}
void withdrawl()
{
time_t t=time(NULL);
struct tm tm=*localtime(&t);
y=tm.tm_year+1900;
m=tm.tm_mon+1;
d=tm.tm_mday;
cout<<"initial-[cheque(s)/cash(c)]"<<" : ";cin>>f;
cout<<"t"<<" * Amount :: ";cin>>with;cout<<endl;
balance=balance-with;
}
int search(int a2)
{
if(accn==a2)
{
return 1;
}
else
{
return 0;
}
}
void modify()
{
char name2[100];
char add2[100];
char phone1[100];
cout<<"t"<<" * New Name ::
";cin>>name2;cout<<endl;
cout<<endl;
cout<<"t"<<" * New Address ::
";cin>>add2;cout<<endl;
cout<<endl;
cout<<"t"<<" * New Phone Number ::
";cin>>phone1;cout<<endl;
cout<<endl;
strcpy(name,name2);
strcpy(add,add2);
strcpy(phone,phone1);
}
void set()
{
clrscr();
time_t t=time(NULL);
struct tm tm=*localtime(&t);
int y=tm.tm_year+1900;
m=tm.tm_mon+1;
int d=tm.tm_mday;
int h=tm.tm_hour;
int mi=tm.tm_min;
int s=tm.tm_sec;
setbkcolor(RED);
cout<<endl;
cout<<"t"<<"Date ::
"<<d<<":"<<m<<":"<<y<<"t"<<"t"<<"t"<<"t"<<"TIME
::"<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
cout<<endl<<endl<<endl<<endl<<endl;
cout<<"t"<<"BRRANCH CODE :: 2830"<<endl;
cout<<"t"<<"BRANCH NAME :: ASHOK
VIHAR"<<endl;
cout<<"t"<<"BRANCH ADDRESS :: D-1/234,ASHOK
VIHAR,DELHI-110052"<<endl<<endl<<endl;
cout<<"t"<<"CUSTOMER NAME :: "<<name<<"
"<<mname<<" "<<lname<<endl;
cout<<"t"<<"ACCOUNT NUMBER ::
"<<accn<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"t"<<"t"<<"CUSTOMER ADDRESS ::
"<<add<<endl<<endl;
cout<<"t"<<"t"<<"PHONE NUMBER ::
"<<phone<<endl<<endl;
}
void show()
{
time_t t=time(NULL);
struct tm tm=*localtime(&t);
int y=tm.tm_year+1900;
m=tm.tm_mon+1;
int d=tm.tm_mday;
int h=tm.tm_hour;
int mi=tm.tm_min;
int s=tm.tm_sec;
cout<<d<<"/"<<m<<"/"<<y<<"tt";
if(f=='c' || f=='C')
cout<<"CASH";
else if(f=='s' || f=='S')
cout<<"CHEQUE";
else
cout<<"---";
cout<<"tt";
if(with==0)
cout<<"NILL"<<"tt";
else
cout<<"NILL"<<"tt";
if(dep==0)
cout<<"NILL"<<"tt"<<balance<<endl;
else
cout<<dep<<"tt"<<balance<<endl;
}
void showD()
{
time_t t=time(NULL);
struct tm tm=*localtime(&t);
int y=tm.tm_year+1900;
m=tm.tm_mon+1;
int d=tm.tm_mday;
int h=tm.tm_hour;
int mi=tm.tm_min;
int s=tm.tm_sec;
cout<<d<<"/"<<m<<"/"<<y<<"tt"<<accn<<"t"<<name<<
" "<<mname<<"
"<<lname<<"ttt"<<add<<"t"<<phone<<"tt"<<balance<<"n
";
}
};
void Bank:: enter(int m)
{
char d;
char j;
cout<<"t"<<" * First Name :: ";cin>>
name;cout<<endl;
cout<<endl;
cout<<"t"<<" * Middle Name ?(y/n) ::
";cin>>d;cout<<endl;
if(d=='y' || d=='Y')
{
cout<<"t"<<" * Middle Name ::
";cin>>mname;cout<<endl;
}
else if(d=='n'|| d=='N')
{
strcmpi(mname," ");
}
cout<<"t"<<" * Last Name ?(y/n) ::
";cin>>j;cout<<endl;
if(j=='y' || j=='Y')
{
cout<<"t"<<" * Last Name ::
";cin>>lname;cout<<endl;
}
else if(j=='n' || j=='N')
{
strcmpi(lname," ");
}
cout<<endl;
accn=m;
cout<<"t"<<" * Address :: ";cin>>add;cout<<endl;
cout<<endl;
y:
cout<<"t"<<" * Phone Number ::
";cin>>phone;cout<<endl;
cout<<endl;
int g=strlen(phone);
if(g<10 || g>11)
{
goto y;
}
cout<<"t"<<" * Balance ::
";cin>>balance;cout<<endl<<endl<<endl<<endl;
cout<<"t"<<"t"<<"Account Number :: "<<m<<endl;
cout<<endl;
}
void main()
{
clrscr();
int gd=DETECT,gm;
int i, x,y;
initgraph(&gd,&gm,"C:TCBGI");
while(!kbhit())
{
settextstyle(DEFAULT_FONT,HORIZ_DIR,8);
setcolor(BLUE);
outtextxy(90,50,"NATIONAL");
settextstyle(DEFAULT_FONT,HORIZ_DIR,8);
setcolor(BLUE);
outtextxy(200,150,"BANK");
settextstyle(DEFAULT_FONT,HORIZ_DIR,8);
setcolor(BLUE);
outtextxy(270,250,"OF");
settextstyle(DEFAULT_FONT,HORIZ_DIR,8);
setcolor(LIGHTRED+BLINK);
outtextxy(160,350,"IN");
settextstyle(DEFAULT_FONT,HORIZ_DIR,8);
setcolor(WHITE);
outtextxy(315,350,"D");
settextstyle(DEFAULT_FONT,HORIZ_DIR,8);
setcolor(GREEN);
outtextxy(390,350,"IA");
for(i=0;i<=500;i++)
{
x=rand()%getmaxx();
y=rand()%getmaxy();
putpixel(x,y,15);
}
delay(500);
cleardevice();
}
getch();
closegraph();
int gd1=DETECT,gm1,a,color,overlap=1;
initgraph(&gd1,&gm1,"C:tcbgi");
setbkcolor(BLUE);
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(GREEN+BLINK);
outtextxy(85,9,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(LIGHTMAGENTA+BLINK);
outtextxy(85,49,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(LIGHTRED+BLINK);
outtextxy(85,89,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(LIGHTGREEN+BLINK);
outtextxy(85,129,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(BROWN+BLINK);
outtextxy(85,169,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(LIGHTBLUE+BLINK);
outtextxy(85,209,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(DARKGRAY+BLINK);
outtextxy(85,249,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(YELLOW+BLINK);
outtextxy(85,289,"NATIONAL BANK OF INDIA");
settextstyle(TRIPLEX_FONT,HORIZ_DIR,3);
setcolor(RED);
outtextxy(85,349,"LOADING.....");
setcolor(RED);
rectangle(97,380,502,409);
setcolor(YELLOW);
for(a=100;a<=500;a++)
{
rectangle(138,405,a,384);
delay(10);
if(overlap==1)
{
setcolor(YELLOW);
settextstyle(2,HORIZ_DIR,5);
overlap=0;
setcolor(YELLOW);
}
}
getch();
closegraph();
char b[5];
char ch[]="admin";
char ch1[]="admin";
int n=admin(ch1);
int m=password(ch);
clrscr();
printf("n");
if(m==0 && n==0)
{
int gd1=DETECT,gm1,a,i,color,overlap=1;
initgraph(&gd1,&gm1,"C:tcbgi");
setbkcolor(BLUE);
settextjustify(CENTER_TEXT,CENTER_TEXT);
settextstyle(DEFAULT_FONT,HORIZ_DIR,3);
setcolor(RED);
for(i=1;i<=100;i++)
{
sprintf(b,"LOADING....%d",i);
outtextxy(getmaxx()/2,getmaxy()/2,b);
delay(50);
if(i==0)
{
break;
}
cleardevice();
}
getch();
closegraph();
clrscr();
int gd=DETECT,gm;
int v, x,y;
initgraph(&gd,&gm,"C:TCBGI");
while(!kbhit())
{
settextstyle(TRIPLEX_SCR_FONT,HORIZ_DIR,9);
setcolor(RED);
outtextxy(90,200,"WELCOME");
settextstyle(BOLD_FONT,HORIZ_DIR,1);
setcolor(YELLOW+BLINK);
outtextxy(270,390,"PRESSTO CONTINUE....");
for(i=0;i<=500;i++)
{
x=rand()%getmaxx();
y=rand()%getmaxy();
putpixel(x,y,15);
}
delay(500);
cleardevice();
}
getch();
closegraph();
//BANK
clrscr();
int ch;
int c;
int s;
/////////////////
fstream fa;
char text1[]="sky.cpp";
fa.open(text1,ios::out|ios::app|ios::in|ios::binary);
fstream fd;
char text2[]="water.cpp";
fd.open(text2,ios::out|ios::app|ios::in|ios::binary);
////////////////////////////////
fstream fs;
char text[]="raju.cpp";
fs.open(text,ios::out|ios::app|ios::in|ios::binary);
Bank k;
clrscr();
do
{ //1
clrscr();
time_t t=time(NULL);
struct tm tm=*localtime(&t);
int y=tm.tm_year+1900;
m=tm.tm_mon+1;
int d=tm.tm_mday;
int h=tm.tm_hour;
int mi=tm.tm_min;
int s=tm.tm_sec;
//cout<<"t"<<"DATE ::
"<<d<<"/"<<m<<"/"<<y<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
int f=0;
textcolor(LIGHTGREEN+BLINK);
cout<<"t"<<"DATE ::
"<<d<<"/"<<m<<"/"<<y<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
for(int yi=1;yi<=80;yi++)
{
gotoxy(f,2);
cprintf("=");
f++;
gotoxy(f,4);
cprintf("=");
}
textcolor(RED);
gotoxy(22,3);
cprintf("NATIONAL BANK OF I N D I A");
cout<<endl<<endl;
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"t
"<<" * 1 - CUSTOMERACCESS"<<endl<<endl;
textcolor(BLUE);
cout<<"t"<<" * 2 - ADMINACCESS"<<endl<<endl;
cout<<"t"<<" * 3 - HELP"<<endl<<endl;
cout<<"t"<<" * 0 - EXIT"<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
textcolor(BLUE);
cout<<"t"<<"t"<<"t"<<" * Enter your choice.....";cin>>ch;cout<<endl;
clrscr();
switch(ch)
{ //1
case 0:
exit(0);
break;
case 1:
do
{ //2
clrscr();
time_t t=time(NULL);
struct tm tm=*localtime(&t);
int y=tm.tm_year+1900;
m=tm.tm_mon+1;
int d=tm.tm_mday;
int h=tm.tm_hour;
int mi=tm.tm_min;
int s=tm.tm_sec;
cout<<"t"<<"DATE :: "<<d<<"/"<<m<<"/"<<y<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
cout<<endl<<endl<<endl;
int f=0;
textcolor(LIGHTGREEN+BLINK);
for(int yi=1;yi<=80;yi++)
{
gotoxy(f,2);
cprintf("=");
f++;
gotoxy(f,4);
cprintf("=");
}
textcolor(RED);
gotoxy(20,3);
cprintf(" C U ST O M E R S ' S A C C E S S ");
cout<<endl<<endl<<endl<<endl;
textcolor(BLUE);
cout<<"t"<<" * 1 - CREATEACCOUNT"<<endl<<endl;
cout<<"t"<<" * 2 - DISPLAY"<<endl<<endl;
cout<<"t"<<" * 3 - DEPOSITE"<<endl<<endl;
cout<<"t"<<" * 4 - WITHDRAWL"<<endl<<endl;
cout<<"t"<<" * 5 - DELETEACCOUNT"<<endl<<endl;
cout<<"t"<<" * 6 - MODIFICATIONS"<<endl<<endl;
cout<<"t"<<" * 7 - HELP"<<endl<<endl;
cout<<"t"<<" * 0 - EXIT"<<endl<<endl;
cout<<"t"<<"t"<<"t"<<" * Enter your choice.....";cin>>c;cout<<endl;
textcolor(BLUE);
clrscr();
switch(c)
{ //2
case 1:
fs.close();
clrscr();
int gd12=DETECT,gm12,a,i,color,overlap=1;
initgraph(&gd12,&gm12,"C:tcbgi");
setbkcolor(RED);
fs.open(text,ios::in|ios::binary);
fs.seekg(0,ios::end);
int p1=fs.tellg();
int m2=p1/sizeof(Bank);
fs.seekg(0,ios::beg);
clrscr();
int max=100;
for(int i1=1;i1<=m2;i1++)
{
fs.read((char*)&k,sizeof(Bank));
max=k.getaccn();
}
max=max+1;
fs.close();
fs.open(text,ios::out|ios::app|ios::binary);
fs.seekg(0,ios::beg);
time_t t=time(NULL);
struct tm tm=*localtime(&t);
int yU=tm.tm_year+1900;
m=tm.tm_mon+1;
int d=tm.tm_mday;
int h=tm.tm_hour;
int mi=tm.tm_min;
int s=tm.tm_sec;
int gd=DETECT,gm;
int u, x,y;
initgraph(&gd,&gm,"C:TCBGI");
settextstyle(BOLD_FONT,HORIZ_DIR,5);
setcolor(BLUE);
cout<<endl;
cout<<"t"<<"DATE ::
"<<d<<"/"<<m<<"/"<<yU<<"t"<<"t"<<"t"<<"t"<<"TIME :: "<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
outtextxy(60,38,"INSERT DETAILS");
cout<<endl<<endl<<endl<<endl<<endl<<endl;
k.enter(max);
fs.write((char*)&k,sizeof(Bank));
cout<<endl<<endl<<endl<<"t"<<"t"<<"t"<<"t"<<"Entered record
has been saved..."<<endl;
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"Press
to continue...."<<endl;
getch();
clrscr();
fs.close();
break;
case 2:
fs.close();
clrscr();
int gd1=DETECT,gm1;
initgraph(&gd1,&gm1,"C:tcbgi");
setbkcolor(GREEN);
textcolor(RED);
fs.open(text,ios::in|ios::binary);
int accn2;
time_t t1=time(NULL);
struct tm tm1=*localtime(&t1);
int y1=tm1.tm_year+1900;
int m11=tm1.tm_mon+1;
int d1=tm1.tm_mday;
int h1=tm1.tm_hour;
int mi1=tm1.tm_min;
int s1=tm1.tm_sec;
int gd32=DETECT,gm32;
int u1, o,p;
initgraph(&gd32,&gm32,"C:TCBGI");
settextstyle(BOLD_FONT,HORIZ_DIR,3);
setcolor(RED);
cout<<endl;
cout<<"t"<<"DATE ::
"<<d1<<"/"<<m11<<"/"<<y1<<"t"<<"t"<<"t"<<"t"<<"TIME :: "<<h1<<":"<<mi1<<":"<<s1<<endl<<endl<<endl;
outtextxy(60,38,"CUTSTOMER'S ACCOUNT");
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"t"<<" * Account Number :: ";cin>>accn2;cout<<endl;
fs.seekg(0,ios::end);
int p12=fs.tellg();
int m1=p12/sizeof(Bank);
fs.seekg(0,ios::beg);
for( i=1;i<=m1;i++)
{
fs.read((char*)&k,sizeof(Bank));
int r1=k.search(accn2);
if (r1==1)
{
k.set();
cout<<endl<<endl<<"Press for account details...."<<endl;
getch();
clrscr();
cout<<endl<<endl;
cout<<" Dear user"<<","<<endl<<"t"<<"Your account details
are as given below......"<<endl<<endl<<endl<<endl;
cout<<"DATE"<<"tt"<<"INITIAL"<<"tt"<<"WITHDRAWL"<<"t"<<"DEPOSITE"<<"t"<<"BAL."<<endl;
k.show();
break;
}
else if(r1!=1)
{
}
}
fs.close();
/////////////////////
fa.close();
fa.open(text1,ios::in|ios::binary);
fa.seekg(0,ios::end);
int p123=fa.tellg();
int m13=p123/sizeof(Bank);
fa.seekg(0,ios::beg);
for( i=1;i<=m13;i++)
{
fa.read((char*)&k,sizeof(Bank));
int r1=k.search(accn2);
if (r1==1)
{
k.show();
}
else if(r1!=1)
{
}
}
fa.close();
//////////////////
fd.close();
fd.open(text2,ios::in|ios::binary);
fd.seekg(0,ios::end);
int p124=fd.tellg();
int m14=p124/sizeof(Bank);
fd.seekg(0,ios::beg);
for( i=1;i<=m14;i++)
{
fd.read((char*)&k,sizeof(Bank));
int r1=k.search(accn2);
if (r1==1)
{
k.show();
}
else if(r1!=1)
{
}
}
fd.close();
///////////////////
cout<<endl<<endl<<endl<<endl<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
break;
case 3:
clrscr();
int gd9=DETECT,gm9;
initgraph(&gd9,&gm9,"C:tcbgi");
setbkcolor(YELLOW);
fs.open(text,ios::in|ios::binary);
fstream max7;
max7.open("risky.cpp",ios::out|ios::app|ios::in|ios::binary);
int accn7;
time_t t2=time(NULL);
struct tm tm2=*localtime(&t2);
int y2=tm2.tm_year+1900;
int m12=tm2.tm_mon+1;
int d2=tm2.tm_mday;
int h2=tm2.tm_hour;
int mi2=tm2.tm_min;
int s2=tm2.tm_sec;
int gd90=DETECT,gm90;
int u0, q,g;
initgraph(&gd90,&gm90,"C:TCBGI");
settextstyle(BOLD_FONT,HORIZ_DIR,5);
setcolor(YELLOW);
cout<<endl;
cout<<"t"<<"DATE ::
"<<d<<"/"<<m<<"/"<<y2<<"t"<<"t"<<"t"<<"t"<<"TIME :: "<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
outtextxy(140,36,"DEPOSITE");
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"t"<<" * Account Number :: ";cin>>accn7;cout<<endl;
char choice5;
cout<<"t"<<" * AREYOU SURE ? (Y/N)"<<endl;
cout<<"t ";cin>>choice5;
if(choice5=='Y' || choice5=='y')
{
fs.seekg(0,ios::end);
int p4=fs.tellg();
int m4=p4/sizeof(k);
fs.seekg(0,ios::beg);
for(i=1;i<=m4;i++)
{
fs.read((char*)&k,sizeof(k));
int g4=k.search(accn7);
if(g4!=1)
{
max7.write((char*)&k,sizeof(Bank));
}
else
{
k.deposite();
max7.write((char*)&k,sizeof(Bank));
////////////////////
fa.close();
fa.open(text1,ios::out|ios::app|ios::binary);
fa.write((char*)&k,sizeof(Bank));
fa.close();
/////////////////////
}
}
fs.close();
remove(text);
fs.open(text,ios::out|ios::binary);
fs.close();
fs.open(text,ios::out|ios::app|ios::binary);
max7.seekg(0,ios::end);
int p5=max7.tellg();
int m5=p5/sizeof(Bank);
fs.seekg(0,ios::beg);
getch();
max7.seekg(0,ios::beg);
for(int y=1;y<=m5;y++)
{
max7.read((char*)&k,sizeof(Bank));
fs.write((char*)&k,sizeof(Bank));
}
remove("risky.cpp");
cout<<endl<<endl<<endl<<endl<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
}
else if(choice5=='N' || choice5=='n')
{
cout<<endl<<endl<<endl<<endl<<endl<<"Press to
continue...."<<endl;
getch();
clrscr();
fs.close();
}
break;
case 4:
clrscr();
int gd7=DETECT,gm7;
initgraph(&gd7,&gm7,"C:tcbgi");
setbkcolor(CYAN);
fs.open(text,ios::in|ios::binary);
fstream max8;
max8.open("kisky.cpp",ios::out|ios::app|ios::in|ios::binary);
int accn8;
time_t t3=time(NULL);
struct tm tm3=*localtime(&t3);
int y3=tm3.tm_year+1900;
int m9=tm3.tm_mon+1;
int d3=tm3.tm_mday;
int h3=tm3.tm_hour;
int mi3=tm3.tm_min;
int s3=tm3.tm_sec;
int gd8=DETECT,gm8;
int ui, l,tl;
initgraph(&gd,&gm,"C:TCBGI");
settextstyle(BOLD_FONT,HORIZ_DIR,5);
setcolor(LIGHTRED);
cout<<endl;
cout<<"t"<<"DATE ::
"<<d3<<"/"<<m9<<"/"<<y3<<"t"<<"t"<<"t"<<"t"<<"TIME :: "<<h3<<":"<<mi3<<":"<<s3<<endl<<endl<<endl;
outtextxy(110,36,"WITHDRAWL");
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"t"<<" * Account Number :: "; cin>>accn8;cout<<endl;
char choice6;
cout<<"t"<<" * AREYOU SURE ? (Y/N)"<<endl;
cout<<"t ";cin>>choice6;
if(choice6=='Y' || choice6=='y')
{
fs.seekg(0,ios::end);
int p4=fs.tellg();
int m4=p4/sizeof(k);
fs.seekg(0,ios::beg);
for(i=1;i<=m4;i++)
{
fs.read((char*)&k,sizeof(k));
int g4=k.search(accn8);
if(g4!=1)
{
max8.write((char*)&k,sizeof(Bank));
/////////////////////
}
else
{
k.withdrawl();
max8.write((char*)&k,sizeof(Bank));
////////////////////
fd.close();
fd.open(text2,ios::out|ios::app|ios::binary);
fd.write((char*)&k,sizeof(Bank));
fd.close();
/////////////////////
}
}
fs.close();
remove(text);
fs.open(text,ios::out|ios::binary);
fs.close();
fs.open(text,ios::out|ios::app|ios::binary);
max8.seekg(0,ios::end);
int p5=max8.tellg();
int m5=p5/sizeof(Bank);
fs.seekg(0,ios::beg);
getch();
max8.seekg(0,ios::beg);
for(int y=1;y<=m5;y++)
{
max8.read((char*)&k,sizeof(Bank));
fs.write((char*)&k,sizeof(Bank));
}
remove("kisky.cpp");
cout<<endl<<endl<<endl<<endl<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
}
else if(choice6=='N' || choice6=='n')
{
cout<<endl<<endl<<endl<<endl<<endl<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
}
break;
case 5:
clrscr();
int gd6=DETECT,gm6;
initgraph(&gd6,&gm6,"C:tcbgi");
setbkcolor(LIGHTBLUE);
fs.close();
fs.open(text,ios::in|ios::binary);
fstream max3;
max3.open("raja.cpp",ios::out|ios::app|ios::in|ios::binary);
int accn3;
time_t t4=time(NULL);
struct tm tm4=*localtime(&t4);
int y4=tm4.tm_year+1900;
int m80=tm4.tm_mon+1;
int d4=tm4.tm_mday;
int h4=tm4.tm_hour;
int mi4=tm4.tm_min;
int s4=tm4.tm_sec;
int gd10=DETECT,gm10;
int v, se,ye;
initgraph(&gd,&gm,"C:TCBGI");
settextstyle(BOLD_FONT,HORIZ_DIR,3);
setcolor(MAGENTA);
cout<<endl;
cout<<"t"<<"DATE ::
"<<d4<<"/"<<m80<<"/"<<y4<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h4<<":"<<mi4<<":"<<s4<<endl<<endl<<endl;
outtextxy(70,36,"DELETE ACCONUT");
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"t"<<" * Account number :: ";cin>>accn3;cout<<endl;
char choice;
cout<<"t"<<" * AREYOU SURE ? (Y/N)"<<endl;
cout<<"t ";cin>>choice;
if(choice=='Y' || choice=='y')
{
fs.seekg(0,ios::end);
int p2=fs.tellg();
int m2=p2/sizeof(Bank);
fs.seekg(0,ios::beg);
for(int l=1;l<=m2;l++)
{
fs.read((char*)&k,sizeof(Bank));
int p2=k.search(accn3);
if(p2!=1)
{
max3.write((char*)&k,sizeof(Bank));
}
}
fs.close();
fs.open(text,ios::out|ios::binary);
fs.close();
fs.open(text,ios::out|ios::app|ios::binary);
max3.seekg(0,ios::end);
int p3=max3.tellg();
int m3=p3/sizeof(Bank);
max3.seekg(0,ios::beg);
for(int j=1;j<=m3;j++)
{
max3.read((char*)&k,sizeof(Bank));
fs.write((char*)&k,sizeof(Bank));
}
remove("raja.cpp");
cout<<endl<<endl<<endl<<endl<<endl<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
}
else if(choice=='N' || choice=='n')
{
cout<<endl<<endl<<endl<<endl<<endl<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
}
break;
case 6:
clrscr();
int gd5=DETECT,gm5;
initgraph(&gd5,&gm5,"C:tcbgi");
setbkcolor(MAGENTA);
fs.open(text,ios::in|ios::binary);
fstream max1;
max1.open("risk.cpp",ios::out|ios::app|ios::in|ios::binary);
int accn4;
time_t t5=time(NULL);
struct tm tm5=*localtime(&t5);
int y5=tm5.tm_year+1900;
int m15=tm5.tm_mon+1;
int d5=tm5.tm_mday;
int h5=tm5.tm_hour;
int mi5=tm5.tm_min;
int s5=tm5.tm_sec;
//cout<<"t"<<"DATE ::
"<<d5<<"/"<<m15<<"/"<<y5<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h5<<":"<<mi5<<":"<<s5<<endl<<endl<<endl;
int gd34=DETECT,gm34;
int u3, x3,hi;
initgraph(&gd34,&gm34,"C:TCBGI");
settextstyle(BOLD_FONT,HORIZ_DIR,5);
setcolor(CYAN);
cout<<endl;
cout<<"t"<<"DATE ::
"<<d<<"/"<<m<<"/"<<y5<<"t"<<"t"<<"t"<<"t"<<"TIME :: "<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
outtextxy(110,36,"MODIFICATIONS");
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"t"<<" * Account Number :: ";cin>>accn4;cout<<endl;
char choice1;
cout<<"t"<<" * AREYOU SURE ? (Y/N)"<<endl;
cout<<"t ";cin>>choice1;
if(choice1=='Y' || choice1=='y')
{
fs.seekg(0,ios::end);
int p4=fs.tellg();
int m4=p4/sizeof(k);
fs.seekg(0,ios::beg);
for(i=1;i<=m4;i++)
{
fs.read((char*)&k,sizeof(k));
int g4=k.search(accn4);
if(g4!=1)
{
max1.write((char*)&k,sizeof(Bank));
}
else
{
k.modify();
max1.write((char*)&k,sizeof(Bank));
}
}
fs.close();
remove(text);
fs.open(text,ios::out|ios::binary);
fs.close();
fs.open(text,ios::out|ios::app|ios::binary);
max1.seekg(0,ios::end);
int p5=max1.tellg();
int m5=p5/sizeof(Bank);
fs.seekg(0,ios::beg);
getch();
max1.seekg(0,ios::beg);
for(int y=1;y<=m5;y++)
{
max1.read((char*)&k,sizeof(Bank));
fs.write((char*)&k,sizeof(Bank));
}
remove("risk.cpp");
cout<<endl<<endl<<endl<<endl<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
}
else if(choice=='N' || choice=='n')
{
cout<<endl<<endl<<endl<<endl<<endl<<"t"<<"Press to
continue...."<<endl;
getch();
clrscr();
fs.close();
}
break;
}//2
} //2
while(c!=0);
break;
case 2:
char ch[]="shahil";
char ch1[]="shahil";
int n=admin1(ch1);
int m=password1(ch);
clrscr();
printf("n");
if(m==0 && n==0)
{
int gd1=DETECT,gm1,a,i,color,overlap=1;
initgraph(&gd1,&gm1,"C:tcbgi");
setcolor(LIGHTBLUE);
rectangle(97,380,502,409);
setbkcolor(YELLOW);
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(GREEN+BLINK);
outtextxy(85,9,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(LIGHTMAGENTA+BLINK);
outtextxy(85,49,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(LIGHTRED+BLINK);
outtextxy(85,89,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(LIGHTGREEN+BLINK);
outtextxy(85,129,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(WHITE+BLINK);
outtextxy(85,169,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(LIGHTBLUE+BLINK);
outtextxy(85,209,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(DARKGRAY+BLINK);
outtextxy(85,249,"NATIONAL BANK OF INDIA");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(RED+BLINK);
outtextxy(85,289,"NATIONAL BANK OF INDIA");
setcolor(LIGHTGRAY);
settextstyle(BOLD_FONT,HORIZ_DIR,2);
setcolor(LIGHTGRAY+BLINK);
outtextxy(85,319,"LOADING........");
for(a=100;a<=500;a++)
{
rectangle(138,405,a,384);
delay(10);
if(overlap==1)
{
setcolor(DARKGRAY);
settextstyle(2,HORIZ_DIR,5);
overlap=0;
setcolor(DARKGRAY);
}
}
getch();
closegraph();
do
{ //3
clrscr();
time_t t2=time(NULL);
struct tm tm2=*localtime(&t2);
int y2=tm2.tm_year+1900;
int m12=tm2.tm_mon+1;
int d2=tm2.tm_mday;
int h2=tm2.tm_hour;
int mi2=tm2.tm_min;
int s2=tm2.tm_sec;
cout<<"t"<<"DATE ::
"<<d2<<"/"<<m12<<"/"<<y2<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h2<<":"<<mi2<<":"<<s2<<endl<<endl<<endl;
int fd=0;
textcolor(LIGHTGREEN+BLINK);
for(int yd=1;yd<=80;yd++)
{
gotoxy(fd,2);
cprintf("=");
fd++;
gotoxy(fd,4);
cprintf("=");
}
textcolor(RED);
gotoxy(22,3);
cout<<endl;
cprintf("A D M I N ' S A C C E S S");
cout<<endl<<endl;
textcolor(BLUE);
cout<<endl<<endl<<endl<<endl<<endl<<"t"<<" * 1 - DISPLAY
ACCOUNT"<<endl<<endl;
cout<<"t"<<" * 2 - DELETE RECORDS"<<endl<<endl;
cout<<"t"<<" * 0 - EXIT"<<endl<<endl;
cout<<"t"<<"t"<<"t"<<" * Enter your choice.....";cin>>s;cout<<endl;
textcolor(BLUE);
clrscr();
switch(s)
{ //3
case 1:
clrscr();
fs.open(text,ios::in|ios::binary);
fs.seekg(0,ios::end);
int p=
fs.tellg();
int m=p/sizeof(Bank);
fs.seekg(0,ios::beg);
clrscr();
int gd1=DETECT,gm1,a,i,color,overlap=1;
initgraph(&gd1,&gm1,"C:tcbgi");
setbkcolor(LIGHTRED);
time_t t2=time(NULL);
struct tm tm2=*localtime(&t2);
int y2=tm2.tm_year+1900;
int m12=tm2.tm_mon+1;
int d2=tm2.tm_mday;
int h2=tm2.tm_hour;
int mi2=tm2.tm_min;
int s2=tm2.tm_sec;
// cout<<"t"<<"DATE ::
"<<d2<<"/"<<m12<<"/"<<y2<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h2<<":"<<mi2<<":"<<s2<<endl<<endl<<endl;
int gd=DETECT,gm;
int u, x,y;
initgraph(&gd,&gm,"C:TCBGI");
settextstyle(BOLD_FONT,HORIZ_DIR,5);
setcolor(BLUE);
cout<<endl;
cout<<"t"<<"DATE ::
"<<d<<"/"<<m<<"/"<<y2<<"t"<<"t"<<"t"<<"t"<<"TIME :: "<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
outtextxy(80,36,"ACCOUNT RECORDS");
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"DATE"<<"tt"<<"ACC.NO."<<"t"<<"NAME"<<"ttt"<<"ADD."<<"t"<<"PHONE"<<
"tt"<<"BAL."<<endl;
for(int io=1;io<=m;io++)
{
fs.read((char*)&k,sizeof(Bank));
k.showD();
}
cout<<endl<<endl<<endl<<endl<<"t"<<"t"<<"t"<<"t"<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
break;
case 2:
clrscr();
int gd11=DETECT,gm11;
initgraph(&gd11,&gm11,"C:tcbgi");
setbkcolor(BLUE);
fs.close();
char choice2;
time_t t1=time(NULL);
struct tm tm1=*localtime(&t1);
int y1=tm1.tm_year+1900;
int m11=tm1.tm_mon+1;
int d1=tm1.tm_mday;
int h1=tm1.tm_hour;
int mi1=tm1.tm_min;
int s1=tm1.tm_sec;
// cout<<"t"<<"DATE ::
"<<d1<<"/"<<m11<<"/"<<y1<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h1<<":"<<mi1<<":"<<s1<<endl<<endl<<endl;
int gd78=DETECT,gm78;
int c, xc,yc;
initgraph(&gd78,&gm78,"C:TCBGI");
settextstyle(BOLD_FONT,HORIZ_DIR,5);
setcolor(BLUE);
cout<<endl;
cout<<"t"<<"DATE ::
"<<d<<"/"<<m<<"/"<<y1<<"t"<<"t"<<"t"<<"t"<<"TIME :: "<<h<<":"<<mi<<":"<<s<<endl<<endl<<endl;
outtextxy(110,36,"DELETE RECORDS");
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"t"<<" * AREYOU SURE ? (Y/N)"<<endl;
cout<<"t ";cin>>choice2;
if(choice2=='Y' || choice2=='y')
{
fs.open(text,ios::out|ios::binary);
cout<<endl<<endl<<endl<<endl<<endl<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
}
else if(choice2=='N' || choice2=='n')
{
cout<<endl<<endl<<endl<<endl<<endl<<"Press to continue...."<<endl;
getch();
clrscr();
fs.close();
}
break;
} //3
} //3
while(s!=0);
}
else
{
printf("admin name is incorrectn");
printf("password is incorrectn");
}
}//1
}//1
while(ch!=0);
}
else
{
time_t t2=time(NULL);
struct tm tm2=*localtime(&t2);
int y2=tm2.tm_year+1900;
int m12=tm2.tm_mon+1;
int d2=tm2.tm_mday;
int h2=tm2.tm_hour;
int mi2=tm2.tm_min;
int s2=tm2.tm_sec;
cout<<"t"<<"DATE ::
"<<d2<<"/"<<m12<<"/"<<y2<<"t"<<"t"<<"t"<<"t"<<"TIME ::
"<<h2<<":"<<mi2<<":"<<s2<<endl<<endl<<endl;
printf("admin name is incorrectn");
printf("password is incorrectn");
}
getch();
}
This program solved by Ms. Aakriti Srivastav (Guided by Jitendra Kumar JAVA
Trainer atVtech Academy of Computers)- C | C++ | DS | JAVA | Android | Python &
Oracle

Bank management system project in c++ with graphics