===========================================================================
CODING
#include<conio.h>
#include<iostream.h>
#include<dos.h>
#include<stdio.h>
#include<string.h>
#include<process.h>
#include<string.h>
char passcode[5][10],account[5][10],phone[5][11],aadhar[5][17];
int z=0;
long amount[5];
long d1,m1,y1,d2,m2,y2,dR,mR;
long yR;
void end()
{
exit(0);
}
void start_date()
{
struct date d;
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
}
void month()
{
long i,j,k;
textbackground(4);
clrscr();
textcolor(YELLOW);
gotoxy(2,2);
cprintf("Old Date: \(%.2ld\/%.2ld\/%.4ld\)",d1,m1,y1);
gotoxy(2,3);
cprintf("Enter Final Date: \(dd\/mm\/yyyy\)");
gotoxy(21,3);
cscanf("%ld",&d2);
gotoxy(24,3);
cscanf("%ld",&m2);
gotoxy(27,3);
cscanf("%ld",&y2);
for(i=y1,dR=0,mR=0,yR=0;i<=y2;i++)
{
dR++;
for(j=0;j<=12;j++)
{
if(i==y1 && j==0)
j=m1;
else if(j==0)
j=1;
if(j==1 || j==4 || j==6 || j==9 || j==11)
{
for(k=0;k<=30;k++)
{
if(i==y1 && j==m1 && k==0)
k=d1;
else if(k==0)
k=1;
if(j==m2 && i==y2 && k==d2)
goto end;
dR++;
}
}
else if(j==2)
{
if(i%4==0)
{
for(k=0;k<=29;k++)
{
if(i==y1 && j==m1 && k==0)
k=d1;
else if(k==0)
k=1;
if(j==m2 && i==y2 && k==d2)
goto end;
dR++;
}
}
else
{
for(k=0;k<=28;k++)
{
if(i==y1 && j==m1 && k==0)
k=d1;
else if(k==0)
k=1;
if(j==m2 && i==y2 && k==d2)
goto end;
dR++;
}
}
}
else
{
for(k=0;k<=31;k++)
{
if(i==y1 && j==m1 && k==0)
k=d1;
else if(k==0)
k=1;
if(j==m2 && i==y2 && k==d2)
goto end;
dR++;
}
}
mR++;
// cout<<dR<<" "<<j<<" "<<i<<"\n";
}
}
end:
yR=mR/12;
d1=d2;
m1=m2;
y1=y2;
cprintf("\n\r\n\rNumber of Days Elpased: %ld \n\r =>Number of Years Elapsed: %ld",dR,yR);
for(i=0;i<=4;i++)
{
if(account[i][0]=='S')
{
if(amount[i]>=2000)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*3.5/100.0;
else
for(j=1;j<=yR;j++)
amount[i]-=amount[i]/20.0;
}
else if(account[i][0]=='C')
{
if(amount[i]<25000)
for(j=1;j<=yR;j++)
amount[i]-=amount[i]*2.5/100.0;
}
else if(account[i][0]=='F')
{
if(yR>=8)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*8.0/100.0;
else if(yR>=4 && yR<8)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*5.0/100.0;
else if(yR==3)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*3.0/100.0;
else if(yR==2)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*2.0/100.0;
else if(yR==1)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*1/100.0;
}
}
getch();
}
void flicker()
{
for(int j=0;j<=8;j++)
{
if(j%2==0)
textbackground(1);
else
textbackground(0);
clrscr();
delay(100);
}
}
void fig(int x,int y)
{
gotoxy(x,y);
cprintf(" Ú------------------------¿");
gotoxy(x,y+1);
cprintf(" / | |");
gotoxy(x,y+2);
cprintf(" ÄÄÄ / | |");
gotoxy(x,y+3);
cprintf(" ³+_+³ < | |");
gotoxy(x,y+4);
cprintf(" === \\ | |");
gotoxy(x,y+5);
cprintf("[| ù |] \\ | |");
gotoxy(x,y+6);
cprintf("|| ù || À-----------------------ÄÙ");
gotoxy(x,y+7);
cprintf("þ === þ ");
gotoxy(x,y+8);
cprintf(" || || ");
gotoxy(x,y+9);
cprintf(" || || ");
gotoxy(x,y+10);
cprintf(" ÛÛ ÛÛ ");
}
void protect(int x,int y,char s[6][25])
{
int i;
fig(x,y);
gotoxy(x+14,y+1);
puts(s[1]);
gotoxy(x+14,y+2);
puts(s[2]);
gotoxy(x+14,y+3);
puts(s[3]);
gotoxy(x+14,y+4);
puts(s[4]);
gotoxy(x+14,y+5);
puts(s[5]);
}
void Display();
void Option();
void M_display(char s[7][25],int m)
{
int y;
textcolor(11);
for(y=24;y>=14;y-=2)
{
gotoxy(25,y);
cprintf(" ");
}
s[m][25]='\0';
s[m][0]=s[m][1]=s[m][2]=' ';
for(y=(m-1)*2+14;y>=12;y--)
{
gotoxy(25,y);
cprintf("%s",s[m]);
delay(400);
gotoxy(25,y);
cprintf(" ");
}
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
if(m>=1 && m<=4)
cprintf("====================");
else
cprintf("========");
//Check Account Balance
if(m==1)
{
char S[6][25],ACCOUNT[10],PASSCODE[10];
int j=0;
month();
getch();
textbackground(1);
clrscr();
Display();
labrl:
textcolor(10);
sprintf(S[1]," MOKSH WORLD BANK ");
sprintf(S[2],"========================");
sprintf(S[3]," Account Number: ____ ");
sprintf(S[4]," ");
sprintf(S[5]," Password: ______ ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
gotoxy(22+32,17);
gets(ACCOUNT);
gotoxy(22+28,19);
gets(PASSCODE);
if(strcmpi(ACCOUNT,"H")==0)
exit(0);
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("===================");
textcolor(10);
sprintf(S[1]," WRONG ACCOUNT NUMBER ");
sprintf(S[2]," OR PASSWORD ");
sprintf(S[3]," ");
sprintf(S[4]," PLEASE TRY AGAIN ");
sprintf(S[5]," ");
for(j=0;j<=4;j++)
{
if(strcmpi(ACCOUNT,account[j])==0 && strcmpi(PASSCODE,passcode[j])==0)
{
if(ACCOUNT[0]=='S')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: SAVINGS ");
}
else if(ACCOUNT[0]=='C')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: CURRENT ");
}
else if(ACCOUNT[0]=='F')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: F.D. ");
}
protect(22,14,S);
char l=getch();
if(l=='N' || l=='n')
goto labrl;
break;
}
if(j==4)
{
protect(22,14,S);
getch();
goto labrl;
}
}
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Your Account Balance:- ");
sprintf(S[2],"========================");
sprintf(S[3]," =>Rs.%ld ",amount[j]);
sprintf(S[4],"========================");
sprintf(S[5]," THANK YOU ");
protect(22,14,S);
}
//Open Savings Account
else if(m==2)
{
char S[6][25],a,ACCOUNT[10],PASSCODE[10],AADHAR[17],PHONE[11];
textcolor(10);
sprintf(S[1]," Open Savings account ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Min. Amount: 2000Rs. ");
sprintf(S[4]," Rate of int.: 3.5\%\a p.a.");
sprintf(S[5]," Penalty: 5\%\a p.a. ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
label:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," Account number:- ");
sprintf(S[5]," S___ (3 Digit)");
protect(22,14,S);
ACCOUNT[0]='S';
gotoxy(47,19);
for(int j=0;ACCOUNT[j]!=13;j++)
ACCOUNT[j+1]=getche();
ACCOUNT[j]='\0';
for(j=0;ACCOUNT[j]!='\0';j++);
if(j!=4)
goto label;
int al,num;
for(j=0,al=0,num=0;j<=3;j++)
{
if(ACCOUNT[j]>=48 && ACCOUNT[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto label;
label1:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," PASSWORD:- ");
sprintf(S[5]," ______(6 Digit)");
protect(22,14,S);
gotoxy(45,19);
gets(PASSCODE);
for(j=0;PASSCODE[j]!='\0';j++);
if(j!=6)
goto label1;
for(j=0,al=0,num=0;j<=5;j++)
{
if(PASSCODE[j]>=48 && PASSCODE[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto label1;
if(strcmpi(ACCOUNT,PASSCODE)==0)
goto label;
label2:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 16 digit ");
sprintf(S[4]," Aadhar No.: ");
sprintf(S[5]," ________________ ");
protect(22,14,S);
gotoxy(40,19);
gets(AADHAR);
label3:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 10 digit ");
sprintf(S[4]," Phone No.: __________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
gets(PHONE);
Re:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Initial ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
cscanf("%ld",&amount[z]);
if(amount[z]<2000)
{
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Amount < Min. ");
sprintf(S[4]," You will face Penalty ");
sprintf(S[5]," Y\/N ");
protect(22,14,S);
if(getch()=='N' || getch()=='n')
goto Re;
else
amount[z]=amount[z]-amount[z]/20.0;
}
sprintf(account[z],"%s",ACCOUNT);
sprintf(passcode[z],"%s",PASSCODE);
sprintf(aadhar[z],"%s",AADHAR);
sprintf(phone[z],"%s",PHONE);
z++;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* Your Savings Account *");
sprintf(S[4],"* is ready to use *");
sprintf(S[5],"************************");
protect(22,14,S);
}
//Open Current Account
else if(m==3)
{
char S[6][25],a,ACCOUNT[10],PASSCODE[10],AADHAR[17],PHONE[11];
textcolor(10);
sprintf(S[1]," Open Current account ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Ideal for Business Man ");
sprintf(S[4]," Min. Amount: 25000Rs. ");
sprintf(S[5]," Rate of int.: NIL ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
textcolor(10);
sprintf(S[1]," Open Current account ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Over Drafting Limit ");
sprintf(S[4]," =>Rs.(-10000) ");
sprintf(S[5]," Rate of int.: 2.5\%\ap.a. ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
zlabel:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," Account number:- ");
sprintf(S[5]," C___ (3 Digit)");
protect(22,14,S);
ACCOUNT[0]='C';
gotoxy(47,19);
for(int j=0;ACCOUNT[j]!=13;j++)
ACCOUNT[j+1]=getche();
ACCOUNT[j]='\0';
for(j=0;ACCOUNT[j]!='\0';j++);
if(j!=4)
goto zlabel;
int al,num;
for(j=0,al=0,num=0;j<=3;j++)
{
if(ACCOUNT[j]>=48 && ACCOUNT[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto zlabel;
zlabel1:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," PASSWORD:- ");
sprintf(S[5]," ______(6 Digit)");
protect(22,14,S);
gotoxy(45,19);
gets(PASSCODE);
for(j=0;PASSCODE[j]!='\0';j++);
if(j!=6)
goto zlabel1;
for(j=0,al=0,num=0;j<=5;j++)
{
if(PASSCODE[j]>=48 && PASSCODE[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto zlabel1;
if(strcmpi(ACCOUNT,PASSCODE)==0)
goto zlabel;
zlabel2:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 16 digit ");
sprintf(S[4]," Aadhar No.: ");
sprintf(S[5]," ________________ ");
protect(22,14,S);
gotoxy(40,19);
gets(AADHAR);
zlabel3:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 10 digit ");
sprintf(S[4]," Phone No.: __________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
gets(PHONE);
zRe:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Initial ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
cscanf("%ld",&amount[z]);
if(amount[z]<2000)
{
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Amount < Min. ");
sprintf(S[4]," You will face Penalty ");
sprintf(S[5]," Y\/N ");
protect(22,14,S);
if(getch()=='N' || getch()=='n')
goto zRe;
else
amount[z]=amount[z]-amount[z]*3.0/100.0;
}
sprintf(account[z],"%s",ACCOUNT);
sprintf(passcode[z],"%s",PASSCODE);
sprintf(aadhar[z],"%s",AADHAR);
sprintf(phone[z],"%s",PHONE);
z++;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* Your Current Account *");
sprintf(S[4],"* is ready to use *");
sprintf(S[5],"************************");
protect(22,14,S);
}
//Open Fixed Deposite
else if(m==4)
{
char S[6][25],a,ACCOUNT[10],PASSCODE[10],AADHAR[17],PHONE[11];
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Benefit in longer Time ");
sprintf(S[4]," Min. Amount: 10000Rs. ");
sprintf(S[5]," Rate of int.: 8\%\a p.5yr. ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Premature F.D. ");
sprintf(S[4]," 1yr.->1\%\a 2yr.->2\%\a ");
sprintf(S[5]," 3yr.->3\%\a 4yr.->5\%\a ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
xlabel:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," Account number:- ");
sprintf(S[5]," F___ (3 Digit)");
protect(22,14,S);
ACCOUNT[0]='F';
gotoxy(47,19);
for(int j=0;ACCOUNT[j]!=13;j++)
ACCOUNT[j+1]=getche();
ACCOUNT[j]='\0';
for(j=0;ACCOUNT[j]!='\0';j++);
if(j!=4)
goto xlabel;
int al,num;
for(j=0,al=0,num=0;j<=3;j++)
{
if(ACCOUNT[j]>=48 && ACCOUNT[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto xlabel;
xlabel1:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," PASSWORD:- ");
sprintf(S[5]," ______(6 Digit)");
protect(22,14,S);
gotoxy(45,19);
gets(PASSCODE);
for(j=0;PASSCODE[j]!='\0';j++);
if(j!=6)
goto xlabel1;
for(j=0,al=0,num=0;j<=5;j++)
{
if(PASSCODE[j]>=48 && PASSCODE[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto xlabel1;
if(strcmpi(ACCOUNT,PASSCODE)==0)
goto xlabel;
xlabel2:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 16 digit ");
sprintf(S[4]," Aadhar No.: ");
sprintf(S[5]," ________________ ");
protect(22,14,S);
gotoxy(40,19);
gets(AADHAR);
xlabel3:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Depoiste ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 10 digit ");
sprintf(S[4]," Phone No.: __________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
gets(PHONE);
xRe:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Initial ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
cscanf("%ld",&amount[z]);
if(amount[z]<2000)
{
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Amount < Min. ");
sprintf(S[4]," You will face Penalty ");
sprintf(S[5]," Y\/N ");
protect(22,14,S);
if(getch()=='N' || getch()=='n')
goto xRe;
else
amount[z]=amount[z]-amount[z]/20.0;
}
sprintf(account[z],"%s",ACCOUNT);
sprintf(passcode[z],"%s",PASSCODE);
sprintf(aadhar[z],"%s",AADHAR);
sprintf(phone[z],"%s",PHONE);
z++;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* Your Fixed Deposite *");
sprintf(S[4],"* is ready to use *");
sprintf(S[5],"************************");
protect(22,14,S);
}
//Withdraw
if(m==5)
{
char S[6][25],ACCOUNT[10],PASSCODE[10];
month();
getch();
textbackground(1);
clrscr();
Display();
labrl1:
textcolor(10);
sprintf(S[1]," MOKSH WORLD BANK ");
sprintf(S[2],"========================");
sprintf(S[3]," Account Number: ____ ");
sprintf(S[4]," ");
sprintf(S[5]," Password: ______ ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
gotoxy(22+32,17);
gets(ACCOUNT);
gotoxy(22+28,19);
gets(PASSCODE);
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," WRONG ACCOUNT NUMBER ");
sprintf(S[2]," OR PASSWORD ");
sprintf(S[3]," ");
sprintf(S[4]," PLEASE TRY AGAIN ");
sprintf(S[5]," ");
protect(22,14,S);
for(int j=0;j<=4;j++)
{
if(strcmpi(ACCOUNT,account[j])==0 && strcmpi(PASSCODE,passcode[j])==0)
{
if(ACCOUNT[0]=='S')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: SAVINGS ");
}
else if(ACCOUNT[0]=='C')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: CURRENT ");
}
else if(ACCOUNT[0]=='F')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: F.D. ");
}
protect(22,14,S);
char l=getch();
if(l=='N' || l=='n')
goto labrl1;
break;
}
if(j==4)
{
getch();
goto labrl1;
}
}
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," WITHDRAW ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Withdrawal ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
long aMOUNT;
gotoxy(49,18);
cscanf("%ld",&aMOUNT);
amount[j]=amount[j]-aMOUNT;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* You have successfully*");
sprintf(S[4]," Withdrawn Rs.%d",aMOUNT);
sprintf(S[5],"************************");
protect(22,14,S);
}
//Deposite
if(m==6)
{
char S[6][25],ACCOUNT[10],PASSCODE[10];
month();
getch();
textbackground(1);
clrscr();
Display();
dlabrl1:
textcolor(10);
sprintf(S[1]," MOKSH WORLD BANK ");
sprintf(S[2],"========================");
sprintf(S[3]," Account Number: ____ ");
sprintf(S[4]," ");
sprintf(S[5]," Password: ______ ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
gotoxy(22+32,17);
gets(ACCOUNT);
gotoxy(22+28,19);
gets(PASSCODE);
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," WRONG ACCOUNT NUMBER ");
sprintf(S[2]," OR PASSWORD ");
sprintf(S[3]," ");
sprintf(S[4]," PLEASE TRY AGAIN ");
sprintf(S[5]," ");
protect(22,14,S);
for(int j=0;j<=4;j++)
{
if(strcmpi(ACCOUNT,account[j])==0 && strcmpi(PASSCODE,passcode[j])==0)
{
if(ACCOUNT[0]=='S')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: SAVINGS ");
}
else if(ACCOUNT[0]=='C')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: CURRENT ");
}
else if(ACCOUNT[0]=='F')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: F.D. ");
}
protect(22,14,S);
char l=getch();
if(l=='N' || l=='n')
goto dlabrl1;
break;
}
if(j==4)
{
getch();
goto dlabrl1;
}
}
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," DEPOSITE ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Deposite ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
long aMOUNT;
gotoxy(49,18);
cscanf("%ld",&aMOUNT);
amount[j]=amount[j]+aMOUNT;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* You have successfully*");
sprintf(S[4]," Deposited Rs.%d",aMOUNT);
sprintf(S[5],"************************");
protect(22,14,S);
}
last:
}
void main()
{
char a;
start_date();
do
{
textbackground(BLUE);
clrscr();
Display();
Option();
getch();
a=getch();
}while(a!='q');
end();
}
void Display()
{
gotoxy(1,2);
textcolor(LIGHTGRAY);
cprintf(" ÛÛÛÛ \n\r");
cprintf(" Û Û \n\r");
cprintf(" Û Û ÛÛÛÛÛÛ ÛÛ Û Û Û \n\r");
cprintf(" ÛÛÛÛ Û Û Û Û Û Û Û \n\r");
cprintf(" Û Û ÛÛÛÛÛÛ Û Û Û ÛÛ \n\r");
cprintf(" Û Û Û Û Û Û Û Û Û \n\r");
cprintf(" ÛÛÛÛ Û Û Û ÛÛ Û Û \n\r");
cprintf(" \n\r");
cprintf(" ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ \n\r\n\r\n\r");
}
void Option()
{
char s[10],S[7][25];
textcolor(10);
gotoxy(25,14);
sprintf(S[1],"1.) Check Amount Balance");
cprintf("%s",S[1]);
gotoxy(25,16);
sprintf(S[2],"2.) Open Savings Account");
cprintf("%s",S[2]);
gotoxy(25,18);
sprintf(S[3],"3.) Open Current Account");
cprintf("%s",S[3]);
gotoxy(25,20);
sprintf(S[4],"4.) Open Fixed Deposite");
cprintf("%s",S[4]);
gotoxy(25,22);
sprintf(S[5],"5.) Withdraw");
cprintf("%s",S[5]);
gotoxy(25,24);
sprintf(S[6],"6.) Deposite");
cprintf("%s",S[6]);
textcolor(YELLOW);
sprintf(s,"ÍÍÍ>>");
int m=1,y=14;
char n;
do
{
if(m>6)
{
m=1;
y=14;
}
gotoxy(19,y);
cprintf("%s",s);
n=getch();
gotoxy(19,y);
cprintf(" ");
m++;
y+=2;
if(n=='q' || n=='Q')
end();
}while(n!=13);
m--;
M_display(S,m);
}
CODING
#include<conio.h>
#include<iostream.h>
#include<dos.h>
#include<stdio.h>
#include<string.h>
#include<process.h>
#include<string.h>
char passcode[5][10],account[5][10],phone[5][11],aadhar[5][17];
int z=0;
long amount[5];
long d1,m1,y1,d2,m2,y2,dR,mR;
long yR;
void end()
{
exit(0);
}
void start_date()
{
struct date d;
getdate(&d);
d1=d.da_day;
m1=d.da_mon;
y1=d.da_year;
}
void month()
{
long i,j,k;
textbackground(4);
clrscr();
textcolor(YELLOW);
gotoxy(2,2);
cprintf("Old Date: \(%.2ld\/%.2ld\/%.4ld\)",d1,m1,y1);
gotoxy(2,3);
cprintf("Enter Final Date: \(dd\/mm\/yyyy\)");
gotoxy(21,3);
cscanf("%ld",&d2);
gotoxy(24,3);
cscanf("%ld",&m2);
gotoxy(27,3);
cscanf("%ld",&y2);
for(i=y1,dR=0,mR=0,yR=0;i<=y2;i++)
{
dR++;
for(j=0;j<=12;j++)
{
if(i==y1 && j==0)
j=m1;
else if(j==0)
j=1;
if(j==1 || j==4 || j==6 || j==9 || j==11)
{
for(k=0;k<=30;k++)
{
if(i==y1 && j==m1 && k==0)
k=d1;
else if(k==0)
k=1;
if(j==m2 && i==y2 && k==d2)
goto end;
dR++;
}
}
else if(j==2)
{
if(i%4==0)
{
for(k=0;k<=29;k++)
{
if(i==y1 && j==m1 && k==0)
k=d1;
else if(k==0)
k=1;
if(j==m2 && i==y2 && k==d2)
goto end;
dR++;
}
}
else
{
for(k=0;k<=28;k++)
{
if(i==y1 && j==m1 && k==0)
k=d1;
else if(k==0)
k=1;
if(j==m2 && i==y2 && k==d2)
goto end;
dR++;
}
}
}
else
{
for(k=0;k<=31;k++)
{
if(i==y1 && j==m1 && k==0)
k=d1;
else if(k==0)
k=1;
if(j==m2 && i==y2 && k==d2)
goto end;
dR++;
}
}
mR++;
// cout<<dR<<" "<<j<<" "<<i<<"\n";
}
}
end:
yR=mR/12;
d1=d2;
m1=m2;
y1=y2;
cprintf("\n\r\n\rNumber of Days Elpased: %ld \n\r =>Number of Years Elapsed: %ld",dR,yR);
for(i=0;i<=4;i++)
{
if(account[i][0]=='S')
{
if(amount[i]>=2000)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*3.5/100.0;
else
for(j=1;j<=yR;j++)
amount[i]-=amount[i]/20.0;
}
else if(account[i][0]=='C')
{
if(amount[i]<25000)
for(j=1;j<=yR;j++)
amount[i]-=amount[i]*2.5/100.0;
}
else if(account[i][0]=='F')
{
if(yR>=8)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*8.0/100.0;
else if(yR>=4 && yR<8)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*5.0/100.0;
else if(yR==3)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*3.0/100.0;
else if(yR==2)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*2.0/100.0;
else if(yR==1)
for(j=1;j<=yR;j++)
amount[i]+=amount[i]*1/100.0;
}
}
getch();
}
void flicker()
{
for(int j=0;j<=8;j++)
{
if(j%2==0)
textbackground(1);
else
textbackground(0);
clrscr();
delay(100);
}
}
void fig(int x,int y)
{
gotoxy(x,y);
cprintf(" Ú------------------------¿");
gotoxy(x,y+1);
cprintf(" / | |");
gotoxy(x,y+2);
cprintf(" ÄÄÄ / | |");
gotoxy(x,y+3);
cprintf(" ³+_+³ < | |");
gotoxy(x,y+4);
cprintf(" === \\ | |");
gotoxy(x,y+5);
cprintf("[| ù |] \\ | |");
gotoxy(x,y+6);
cprintf("|| ù || À-----------------------ÄÙ");
gotoxy(x,y+7);
cprintf("þ === þ ");
gotoxy(x,y+8);
cprintf(" || || ");
gotoxy(x,y+9);
cprintf(" || || ");
gotoxy(x,y+10);
cprintf(" ÛÛ ÛÛ ");
}
void protect(int x,int y,char s[6][25])
{
int i;
fig(x,y);
gotoxy(x+14,y+1);
puts(s[1]);
gotoxy(x+14,y+2);
puts(s[2]);
gotoxy(x+14,y+3);
puts(s[3]);
gotoxy(x+14,y+4);
puts(s[4]);
gotoxy(x+14,y+5);
puts(s[5]);
}
void Display();
void Option();
void M_display(char s[7][25],int m)
{
int y;
textcolor(11);
for(y=24;y>=14;y-=2)
{
gotoxy(25,y);
cprintf(" ");
}
s[m][25]='\0';
s[m][0]=s[m][1]=s[m][2]=' ';
for(y=(m-1)*2+14;y>=12;y--)
{
gotoxy(25,y);
cprintf("%s",s[m]);
delay(400);
gotoxy(25,y);
cprintf(" ");
}
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
if(m>=1 && m<=4)
cprintf("====================");
else
cprintf("========");
//Check Account Balance
if(m==1)
{
char S[6][25],ACCOUNT[10],PASSCODE[10];
int j=0;
month();
getch();
textbackground(1);
clrscr();
Display();
labrl:
textcolor(10);
sprintf(S[1]," MOKSH WORLD BANK ");
sprintf(S[2],"========================");
sprintf(S[3]," Account Number: ____ ");
sprintf(S[4]," ");
sprintf(S[5]," Password: ______ ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
gotoxy(22+32,17);
gets(ACCOUNT);
gotoxy(22+28,19);
gets(PASSCODE);
if(strcmpi(ACCOUNT,"H")==0)
exit(0);
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("===================");
textcolor(10);
sprintf(S[1]," WRONG ACCOUNT NUMBER ");
sprintf(S[2]," OR PASSWORD ");
sprintf(S[3]," ");
sprintf(S[4]," PLEASE TRY AGAIN ");
sprintf(S[5]," ");
for(j=0;j<=4;j++)
{
if(strcmpi(ACCOUNT,account[j])==0 && strcmpi(PASSCODE,passcode[j])==0)
{
if(ACCOUNT[0]=='S')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: SAVINGS ");
}
else if(ACCOUNT[0]=='C')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: CURRENT ");
}
else if(ACCOUNT[0]=='F')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: F.D. ");
}
protect(22,14,S);
char l=getch();
if(l=='N' || l=='n')
goto labrl;
break;
}
if(j==4)
{
protect(22,14,S);
getch();
goto labrl;
}
}
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Your Account Balance:- ");
sprintf(S[2],"========================");
sprintf(S[3]," =>Rs.%ld ",amount[j]);
sprintf(S[4],"========================");
sprintf(S[5]," THANK YOU ");
protect(22,14,S);
}
//Open Savings Account
else if(m==2)
{
char S[6][25],a,ACCOUNT[10],PASSCODE[10],AADHAR[17],PHONE[11];
textcolor(10);
sprintf(S[1]," Open Savings account ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Min. Amount: 2000Rs. ");
sprintf(S[4]," Rate of int.: 3.5\%\a p.a.");
sprintf(S[5]," Penalty: 5\%\a p.a. ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
label:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," Account number:- ");
sprintf(S[5]," S___ (3 Digit)");
protect(22,14,S);
ACCOUNT[0]='S';
gotoxy(47,19);
for(int j=0;ACCOUNT[j]!=13;j++)
ACCOUNT[j+1]=getche();
ACCOUNT[j]='\0';
for(j=0;ACCOUNT[j]!='\0';j++);
if(j!=4)
goto label;
int al,num;
for(j=0,al=0,num=0;j<=3;j++)
{
if(ACCOUNT[j]>=48 && ACCOUNT[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto label;
label1:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," PASSWORD:- ");
sprintf(S[5]," ______(6 Digit)");
protect(22,14,S);
gotoxy(45,19);
gets(PASSCODE);
for(j=0;PASSCODE[j]!='\0';j++);
if(j!=6)
goto label1;
for(j=0,al=0,num=0;j<=5;j++)
{
if(PASSCODE[j]>=48 && PASSCODE[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto label1;
if(strcmpi(ACCOUNT,PASSCODE)==0)
goto label;
label2:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 16 digit ");
sprintf(S[4]," Aadhar No.: ");
sprintf(S[5]," ________________ ");
protect(22,14,S);
gotoxy(40,19);
gets(AADHAR);
label3:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 10 digit ");
sprintf(S[4]," Phone No.: __________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
gets(PHONE);
Re:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Initial ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
cscanf("%ld",&amount[z]);
if(amount[z]<2000)
{
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Savings Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Amount < Min. ");
sprintf(S[4]," You will face Penalty ");
sprintf(S[5]," Y\/N ");
protect(22,14,S);
if(getch()=='N' || getch()=='n')
goto Re;
else
amount[z]=amount[z]-amount[z]/20.0;
}
sprintf(account[z],"%s",ACCOUNT);
sprintf(passcode[z],"%s",PASSCODE);
sprintf(aadhar[z],"%s",AADHAR);
sprintf(phone[z],"%s",PHONE);
z++;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* Your Savings Account *");
sprintf(S[4],"* is ready to use *");
sprintf(S[5],"************************");
protect(22,14,S);
}
//Open Current Account
else if(m==3)
{
char S[6][25],a,ACCOUNT[10],PASSCODE[10],AADHAR[17],PHONE[11];
textcolor(10);
sprintf(S[1]," Open Current account ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Ideal for Business Man ");
sprintf(S[4]," Min. Amount: 25000Rs. ");
sprintf(S[5]," Rate of int.: NIL ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
textcolor(10);
sprintf(S[1]," Open Current account ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Over Drafting Limit ");
sprintf(S[4]," =>Rs.(-10000) ");
sprintf(S[5]," Rate of int.: 2.5\%\ap.a. ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
zlabel:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," Account number:- ");
sprintf(S[5]," C___ (3 Digit)");
protect(22,14,S);
ACCOUNT[0]='C';
gotoxy(47,19);
for(int j=0;ACCOUNT[j]!=13;j++)
ACCOUNT[j+1]=getche();
ACCOUNT[j]='\0';
for(j=0;ACCOUNT[j]!='\0';j++);
if(j!=4)
goto zlabel;
int al,num;
for(j=0,al=0,num=0;j<=3;j++)
{
if(ACCOUNT[j]>=48 && ACCOUNT[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto zlabel;
zlabel1:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," PASSWORD:- ");
sprintf(S[5]," ______(6 Digit)");
protect(22,14,S);
gotoxy(45,19);
gets(PASSCODE);
for(j=0;PASSCODE[j]!='\0';j++);
if(j!=6)
goto zlabel1;
for(j=0,al=0,num=0;j<=5;j++)
{
if(PASSCODE[j]>=48 && PASSCODE[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto zlabel1;
if(strcmpi(ACCOUNT,PASSCODE)==0)
goto zlabel;
zlabel2:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 16 digit ");
sprintf(S[4]," Aadhar No.: ");
sprintf(S[5]," ________________ ");
protect(22,14,S);
gotoxy(40,19);
gets(AADHAR);
zlabel3:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 10 digit ");
sprintf(S[4]," Phone No.: __________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
gets(PHONE);
zRe:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Initial ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
cscanf("%ld",&amount[z]);
if(amount[z]<2000)
{
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Current Account ");
sprintf(S[2],"========================");
sprintf(S[3]," Amount < Min. ");
sprintf(S[4]," You will face Penalty ");
sprintf(S[5]," Y\/N ");
protect(22,14,S);
if(getch()=='N' || getch()=='n')
goto zRe;
else
amount[z]=amount[z]-amount[z]*3.0/100.0;
}
sprintf(account[z],"%s",ACCOUNT);
sprintf(passcode[z],"%s",PASSCODE);
sprintf(aadhar[z],"%s",AADHAR);
sprintf(phone[z],"%s",PHONE);
z++;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* Your Current Account *");
sprintf(S[4],"* is ready to use *");
sprintf(S[5],"************************");
protect(22,14,S);
}
//Open Fixed Deposite
else if(m==4)
{
char S[6][25],a,ACCOUNT[10],PASSCODE[10],AADHAR[17],PHONE[11];
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Benefit in longer Time ");
sprintf(S[4]," Min. Amount: 10000Rs. ");
sprintf(S[5]," Rate of int.: 8\%\a p.5yr. ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"==TERMS AND CONDITIONS==");
sprintf(S[3]," Premature F.D. ");
sprintf(S[4]," 1yr.->1\%\a 2yr.->2\%\a ");
sprintf(S[5]," 3yr.->3\%\a 4yr.->5\%\a ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
a=getch();
if(a=='N' || a=='n')
goto last;
xlabel:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," Account number:- ");
sprintf(S[5]," F___ (3 Digit)");
protect(22,14,S);
ACCOUNT[0]='F';
gotoxy(47,19);
for(int j=0;ACCOUNT[j]!=13;j++)
ACCOUNT[j+1]=getche();
ACCOUNT[j]='\0';
for(j=0;ACCOUNT[j]!='\0';j++);
if(j!=4)
goto xlabel;
int al,num;
for(j=0,al=0,num=0;j<=3;j++)
{
if(ACCOUNT[j]>=48 && ACCOUNT[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto xlabel;
xlabel1:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Create Alpha numberic ");
sprintf(S[4]," PASSWORD:- ");
sprintf(S[5]," ______(6 Digit)");
protect(22,14,S);
gotoxy(45,19);
gets(PASSCODE);
for(j=0;PASSCODE[j]!='\0';j++);
if(j!=6)
goto xlabel1;
for(j=0,al=0,num=0;j<=5;j++)
{
if(PASSCODE[j]>=48 && PASSCODE[j]<=57)
num++;
else
al++;
}
if(num==0 || al==0)
goto xlabel1;
if(strcmpi(ACCOUNT,PASSCODE)==0)
goto xlabel;
xlabel2:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 16 digit ");
sprintf(S[4]," Aadhar No.: ");
sprintf(S[5]," ________________ ");
protect(22,14,S);
gotoxy(40,19);
gets(AADHAR);
xlabel3:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Depoiste ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter 10 digit ");
sprintf(S[4]," Phone No.: __________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
gets(PHONE);
xRe:
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Initial ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
gotoxy(49,18);
cscanf("%ld",&amount[z]);
if(amount[z]<2000)
{
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," Open Fixed Deposite ");
sprintf(S[2],"========================");
sprintf(S[3]," Amount < Min. ");
sprintf(S[4]," You will face Penalty ");
sprintf(S[5]," Y\/N ");
protect(22,14,S);
if(getch()=='N' || getch()=='n')
goto xRe;
else
amount[z]=amount[z]-amount[z]/20.0;
}
sprintf(account[z],"%s",ACCOUNT);
sprintf(passcode[z],"%s",PASSCODE);
sprintf(aadhar[z],"%s",AADHAR);
sprintf(phone[z],"%s",PHONE);
z++;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* Your Fixed Deposite *");
sprintf(S[4],"* is ready to use *");
sprintf(S[5],"************************");
protect(22,14,S);
}
//Withdraw
if(m==5)
{
char S[6][25],ACCOUNT[10],PASSCODE[10];
month();
getch();
textbackground(1);
clrscr();
Display();
labrl1:
textcolor(10);
sprintf(S[1]," MOKSH WORLD BANK ");
sprintf(S[2],"========================");
sprintf(S[3]," Account Number: ____ ");
sprintf(S[4]," ");
sprintf(S[5]," Password: ______ ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
gotoxy(22+32,17);
gets(ACCOUNT);
gotoxy(22+28,19);
gets(PASSCODE);
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," WRONG ACCOUNT NUMBER ");
sprintf(S[2]," OR PASSWORD ");
sprintf(S[3]," ");
sprintf(S[4]," PLEASE TRY AGAIN ");
sprintf(S[5]," ");
protect(22,14,S);
for(int j=0;j<=4;j++)
{
if(strcmpi(ACCOUNT,account[j])==0 && strcmpi(PASSCODE,passcode[j])==0)
{
if(ACCOUNT[0]=='S')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: SAVINGS ");
}
else if(ACCOUNT[0]=='C')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: CURRENT ");
}
else if(ACCOUNT[0]=='F')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: F.D. ");
}
protect(22,14,S);
char l=getch();
if(l=='N' || l=='n')
goto labrl1;
break;
}
if(j==4)
{
getch();
goto labrl1;
}
}
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," WITHDRAW ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Withdrawal ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
long aMOUNT;
gotoxy(49,18);
cscanf("%ld",&aMOUNT);
amount[j]=amount[j]-aMOUNT;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* You have successfully*");
sprintf(S[4]," Withdrawn Rs.%d",aMOUNT);
sprintf(S[5],"************************");
protect(22,14,S);
}
//Deposite
if(m==6)
{
char S[6][25],ACCOUNT[10],PASSCODE[10];
month();
getch();
textbackground(1);
clrscr();
Display();
dlabrl1:
textcolor(10);
sprintf(S[1]," MOKSH WORLD BANK ");
sprintf(S[2],"========================");
sprintf(S[3]," Account Number: ____ ");
sprintf(S[4]," ");
sprintf(S[5]," Password: ______ ");
S[1][24]=S[2][24]=S[3][24]=S[4][24]=S[5][24]='\0';
protect(22,14,S);
gotoxy(22+32,17);
gets(ACCOUNT);
gotoxy(22+28,19);
gets(PASSCODE);
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," WRONG ACCOUNT NUMBER ");
sprintf(S[2]," OR PASSWORD ");
sprintf(S[3]," ");
sprintf(S[4]," PLEASE TRY AGAIN ");
sprintf(S[5]," ");
protect(22,14,S);
for(int j=0;j<=4;j++)
{
if(strcmpi(ACCOUNT,account[j])==0 && strcmpi(PASSCODE,passcode[j])==0)
{
if(ACCOUNT[0]=='S')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: SAVINGS ");
}
else if(ACCOUNT[0]=='C')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: CURRENT ");
}
else if(ACCOUNT[0]=='F')
{
sprintf(S[1]," Is This your Account ");
sprintf(S[2],"========================");
sprintf(S[3],"Aadhar: %s",aadhar[j]);
sprintf(S[4]," Phone No.: %s",phone[j]);
sprintf(S[5]," Account Type: F.D. ");
}
protect(22,14,S);
char l=getch();
if(l=='N' || l=='n')
goto dlabrl1;
break;
}
if(j==4)
{
getch();
goto dlabrl1;
}
}
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1]," DEPOSITE ");
sprintf(S[2],"========================");
sprintf(S[3]," Enter Deposite ");
sprintf(S[4]," Amount: Rs.________ ");
sprintf(S[5]," ");
protect(22,14,S);
long aMOUNT;
gotoxy(49,18);
cscanf("%ld",&aMOUNT);
amount[j]=amount[j]+aMOUNT;
flicker();
textbackground(1);
clrscr();
Display();
textcolor(11);
gotoxy(25,12);
cprintf("%s",s[m]);
gotoxy(30,13);
cprintf("====================");
textcolor(10);
sprintf(S[1],"************************");
sprintf(S[2],"* SUCCESSFUL! *");
sprintf(S[3],"* You have successfully*");
sprintf(S[4]," Deposited Rs.%d",aMOUNT);
sprintf(S[5],"************************");
protect(22,14,S);
}
last:
}
void main()
{
char a;
start_date();
do
{
textbackground(BLUE);
clrscr();
Display();
Option();
getch();
a=getch();
}while(a!='q');
end();
}
void Display()
{
gotoxy(1,2);
textcolor(LIGHTGRAY);
cprintf(" ÛÛÛÛ \n\r");
cprintf(" Û Û \n\r");
cprintf(" Û Û ÛÛÛÛÛÛ ÛÛ Û Û Û \n\r");
cprintf(" ÛÛÛÛ Û Û Û Û Û Û Û \n\r");
cprintf(" Û Û ÛÛÛÛÛÛ Û Û Û ÛÛ \n\r");
cprintf(" Û Û Û Û Û Û Û Û Û \n\r");
cprintf(" ÛÛÛÛ Û Û Û ÛÛ Û Û \n\r");
cprintf(" \n\r");
cprintf(" ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ \n\r\n\r\n\r");
}
void Option()
{
char s[10],S[7][25];
textcolor(10);
gotoxy(25,14);
sprintf(S[1],"1.) Check Amount Balance");
cprintf("%s",S[1]);
gotoxy(25,16);
sprintf(S[2],"2.) Open Savings Account");
cprintf("%s",S[2]);
gotoxy(25,18);
sprintf(S[3],"3.) Open Current Account");
cprintf("%s",S[3]);
gotoxy(25,20);
sprintf(S[4],"4.) Open Fixed Deposite");
cprintf("%s",S[4]);
gotoxy(25,22);
sprintf(S[5],"5.) Withdraw");
cprintf("%s",S[5]);
gotoxy(25,24);
sprintf(S[6],"6.) Deposite");
cprintf("%s",S[6]);
textcolor(YELLOW);
sprintf(s,"ÍÍÍ>>");
int m=1,y=14;
char n;
do
{
if(m>6)
{
m=1;
y=14;
}
gotoxy(19,y);
cprintf("%s",s);
n=getch();
gotoxy(19,y);
cprintf(" ");
m++;
y+=2;
if(n=='q' || n=='Q')
end();
}while(n!=13);
m--;
M_display(S,m);
}
===========================================================================
OUTPUT
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
║
▼
PLEASE CLICK HERE FOR OUTPUT VIDEO
No comments:
Post a Comment