SlideShare a Scribd company logo
1 of 60
#include <process.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <dos.h>
#include <ctype.h>
#include <fstream.h>
#include <graphics.h>
#include <math.h>
fstreammatx,prof,testf,edit,table;
struct date da;
int dayy,month,yearr,mnu;
floatincrease,term;
floatsb,cd,f1=0,f2=0,f3=0,f4=0,f5=0,f6=0,l1=0,l2=0,l3=0,ln=0;
int n,k,q,ti=250,iup=0,acc,totacc,remn,endfil,type,can;
floatw,d,b,fixra,r,per; //Global Variables
char na[90],erropen[4096],gud[20],rap[10],getop,scre1[4096],sfk[4000];
char kna[90],gna[90];
char occ[90],h1[90],h2[90],po[90],dt[90],ct[90],ph[30],acctp[90],tp,par[30],fna[90];
int accno,dd,yy,mm;intd1,m1,y1,d2,m2,y2;inter=22,ty=38,ui=20;
class backgrounds
{
public:
backgrounds()
{
getdate(&da);
dayy=da.da_day;
month=da.da_mon;
yearr=da.da_year;
skining("LOA D I N G"," ",ti,100,1,22,14,8);
ti=0;
strcpy(kna,"C:BankingSactions");
}
voidskining(charfunction[90],chargraphics[5],inttime_delay,intsoun,intx,inty,intcolour,intfuncol)
{
int worty=0;char any;
if(time_delay)
{
textcolor(BLUE);
textbackground(GREEN);
clrscr();
window(1,10,80,30);
textbackground(colour);
clrscr();
window(1,1,80,20);
textbackground(BLUE);
clrscr();
window(1,1,80,50);
for(inttim,dim=1,poy=0;dim/100<101;dim+=tim,poy++)
{
gate:
if(random(time_delay)==RED||random(time_delay)==funcol) random(time_delay)+1;
tim=random(time_delay);
delay(tim);
gotoxy(x+20,y);
textcolor(funcol+BLINK);
textbackground(colour);
if(x+poy>22) textbackground(RED);
cprintf(function);
gotoxy(x+37,y);
cout<<dim/100<<"%";
sound((poy*soun)+soun);
textbackground(RED);
gotoxy(x+poy,y);
if(poy>20)
textcolor(BLUE);
if(x+poy<21||x+poy>27)
{
if(tim%2==1)
cprintf(graphics);
cprintf(graphics,graphics);
}
if(y==22)
{
if(dim)
{
gotoxy(50,49);
cprintf("Checking");
worty=random(tim*2);
gotoxy(60,49);
textcolor(BLACK);
cprintf("Account2008-1678- ");
gotoxy(78,49);
cout<<worty;
if(dim/100>=56&dim/100<=58)
{
gotoxy(60,49);
cprintf("Openingfiles");
delay(50);
testf.open("C:bankingAccounts.bank",ios::in);
testf>>gud>>totacc>>na>>occ>>h1>>h2>>
po>>dt>>ct>>ph>>tp>>dd>>mm>>yy;
testf.close();
if(!gud)
{
testf.open("C:bankingAccounts.bank",ios::out);
if(testf.good())
{
testf<<"1n";
cprintf("nrFirstRunDockFull");
testf.close();
}
}
textbackground(BLUE);
textcolor(YELLOW);
if(!testf.good())
{
gotoxy(3,40);
cprintf("Errorinopeningafile");
gotoxy(3,42);
textcolor(BLUE);
textbackground(YELLOW);
cprintf("PressYto Continue");
gotoxy(3,43);
cprintf("PressGto Create new");
gotoxy(3,44);
cprintf("Othertoexit");
gotoxy(6,44);
getop=getch();
if(getop=='y'||getop=='Y') {dim=5900;continue;}
else if(getop=='G'||getop=='g')
{
testf.open("C:bankingAccounts.bank",ios::out);
matx.open("C:bankingBase.bank",ios::out);
matx<<dayy<<"t"<<month<<"t"<<yearr<<"t"<<q;
matx.close();
if(testf.good())
{
testf<<"1";
cprintf("nrNEWFile createdsucesfully");
testf.close();
}
continue;
}
else nosound();exit(0);
}
else
{
gotoxy(1,49);
cprintf("All filesopenedsucessfully");
}
}
}
}
if(dim/100>91)
gotoxy(x+50,y);
}
gotoxy(x+37,y);
cout<<"100%";
nosound();
cprintf("nnnrPressanykeytocontinue");
if(getch()=='`') {if(y==22) repairlab(0);}
textcolor(BLACK);
time_delay=0;
}
}
voidcarre(intt)
{
gotoxy(4,3);
cout<<"Date";
gotoxy(15,3);
cout<<"Particulars";
gotoxy(27,3);
cout<<"Withdrawls";
gotoxy(4,17);
cout<<"Deposits";
gotoxy(15,17);
cout<<"Balance";
gotoxy(28,17);
cout<<"Initials";
}
voidcarre()
{
gotoxy(5,3);
textcolor(5);
cprintf("Date");
textcolor(6);
gotoxy(15,3);
textcolor(7);
cprintf("Particulars");
gotoxy(29,3);
textcolor(8);
cprintf("Withdrawls");
gotoxy(4,27);
textcolor(9);
cprintf("Deposits");
gotoxy(15,27);
textcolor(10);
cprintf("Balance");
gotoxy(29,27);
textcolor(11);
cprintf("Initials");
}
voidnumbe()
{
textbackground(RED);
clrscr();
textbackground(BLUE);
for(inti=0;i<50;i++)
{
gotoxy(1,i);
cprintf("");
gotoxy(13,i);
cprintf("");
gotoxy(27,i);
cprintf("");
gotoxy(40,i);
cprintf("");
}
for(i=3;i<38;i++)
{
gotoxy(i,1);
cprintf(" ");
gotoxy(i-3,50);
cprintf(" ");
}
}
voidnumbe(intt)
{
int gdriver= DETECT,
errorcode,gmode;
initgraph(&gdriver,&gmode,"");
setcolor(BLUE);setbkcolor(GREEN);
for(intlxl=0;lxl!=400;lxl+=100)
line(lxl,getmaxy(),lxl,0);
for(intlyl=0;lyl!=600;lyl+=15)
line(300,lyl,0,lyl);
for(lxl=1;lxl!=8;lxl+=1)
line(lxl,getmaxy(),lxl,0);
for(lyl=1;lyl!=8;lyl+=1)
line(300,lyl,0,lyl);
for(lxl=290;lxl!=300;lxl+=1)
line(lxl,getmaxy(),lxl,0);
for(lyl=470;lyl!=480;lyl+=1)
line(300,lyl,0,lyl);
}
voidfixit()
{
gettext(1,12,55,40,scre1);
while(ui!=30)
{
sound(ui*10);
er--;ty++;ui++;
window(10,er,ty,ui);delay(100);
textbackground(RED);clrscr();
} nosound();
}
voidfixout()
{
while(ui!=1)
{
sound(ui*10);
window(10,er,ty+1,ui+1);
textbackground(BLUE);clrscr();
er++;ty=ty--;ui--;
puttext(1,12,55,40,scre1);
window(10,er,ty,ui+1);
textbackground(RED);clrscr();
delay(100);
}
puttext(1,12,55,40,scre1);
nosound();
window(1,1,80,50);
er=22;ty=38;ui=20;
}
loderunner(inttim)
{
if(!tim)
{
if(wherex()<79)
{
textbackground(RED);
cprintf(" ");
sound(wherex()*20);
delay(600);
}
}
}
voidAccount_type()
{
window(46,33,72,47);textcolor(RED);textbackground(GREEN);
cprintf("PRESSnnrSforSAVINGSBANKACCOUNTnnrCforCURRENTACCOUNTnnr");
cprintf("FforTermor FixedAccountnnrLtotake a loannnr");
cin>>tp;window(46,33,72,47);textbackground(BLUE);textcolor(15);clrscr();window(1,1,80,50);
gotoxy(33,31);
table.open("C:bankingRates.bank",ios::in);
table.seekg(52);
table>>sb>>cd>>f1>>f2>>f3>>f4>>f5>>f6;
table.close();
if(tp=='s'||tp=='S')
{
cprintf("SAVINGSBANK");
ty=45;
fixit();
cout<<" ";cprintf("PRESENTS.BRATE");cout<<"t"<<sb<<"%nnnt";
cout<<" SavingsBanknnt Enterthe initial depositforSBt";
cin>>d;
fixout();
}
else if(tp=='c'||tp=='C')
{
cprintf("CURRENTACCOUNT");
ty=45;
fixit();
cout<<" ";cprintf("PRESENTC.DRATE");cout<<"t"<<cd<<"%nnnt";
cout<<" CurrentAccountnnt Enterthe initial depositt";
cin>>d;
fixout();
}
else if(tp=='f'||tp=='F')
{
cprintf("FIXEDDEPOSIT");
fixit();
cout<<" ";cprintf("DURATIONr");cout<<"tttt";cprintf("PRESENTRATE");
cout<<"nnt 1. 15 daysand upto45 dayst"<<f1<<"%";
cout<<"nnt 2. 46 daysand upto179 dayst"<<f2<<"%";
cout<<"nnt 3. 180 days andupto 1 yeart"<<f3<<"%";
cout<<"nnt 4. 1 year to lessthan2 yearst"<<f4<<"%";
cout<<"nnt 5. 2 yearsto lessthan3 yearst"<<f5<<"%";
cout<<"nnt 6. 3 yearsand abovett"<<f6<<"%";
cout<<"nnt Enter the termperiodt";
cin>>term;
cout<<"nt Enteramountof Fixeddepositt";
cin>>d;
if(term>=15&&term<=45) fixra=f1;
if(term>=46&&term<=179) fixra=f2;
if(term>=180&&term<=365) fixra=f3;
if(term>=1&&term<2) fixra=f4;
if(term>=2&&term<3) fixra=f5;
if(term>=3) fixra=f6;
cout<<"nnnnnThe calculatedrate forthis"
<<"nnperiod_________";cout<<fixra;
ln=fixra;per=term;
fixout();
}
else if(tp=='l'||tp=='L')
{
cprintf("LOAN");
}
else {cprintf("Wrongchoice");Account_type();}
window(1,1,80,50);
}
voidwittpart(intposit)
{
if(type==2)
{
if(posit==3) {strcpy(par,"ByCash");}
if(posit==4) {strcpy(par,"FromCheque");}
if(posit==5) {strcpy(par,"ByPerson");}
if(posit==6) {strcpy(par,"FromNRE");}
if(posit==7) {strcpy(par,"ByInterest");}
if(posit==8) {strcpy(par,"ByClearing");}
if(posit==9) {strcpy(par,"ByBF");}
if(posit==10) {strcpy(par,"BySalary");}
}
else if(type==1)
{
if(posit==3) {strcpy(par,"ByCash");}
if(posit==4) {strcpy(par,"ToAccount");}
if(posit==5) {strcpy(par,"ToWithdraw");}
if(posit==6) {strcpy(par,"ToSelf");}
if(posit==7) {strcpy(par,"ToPerson");}
}
puts(par);
}
voidwittwain()
{
char sck[4000],getop;ints=3;
gettext(50,26,60,36,sck);
gotoxy(50,26);textattr(YELLOW);
cprintf("Particulars");
textbackground(BLUE);textcolor(GREEN);
if(type==1){screwith();}
if(type==2)scredepo();
textbackground(5);
gotoxy(50,27);cprintf("ByCash ");
do
{
gotoxy(15,n+4);
char getop=getch();
if(getop=='2')
{
if(type==2)if(s<10) s++;
if(type==1)if(s<7) s++;
puttext(50,24,60,36,sfk);
gotoxy(50,24+s);cprintf(" ");
gotoxy(50,24+s);wittpart(s);
}
if(getop=='8')
{
if(s>3) s--;
puttext(50,24,60,36,sfk);
gotoxy(50,24+s);cprintf(" ");
gotoxy(50,24+s);wittpart(s);
}
if(getop=='5')
{
puttext(50,26,60,36,sck);
gotoxy(15,n+4);wittpart(s);
if(s==4||s==5||s==6)
{
gotoxy(15,n+4);getch();
textattr(YELLOW+BLINK);
cprintf("ENTERHERE ");
textcolor(YELLOW);
gotoxy(15,n+4);
cin>>rap;
strcpy(par,"FROM");
}
return;
}
}while(getop);
}
voidscrewith()
{
window(50,27,60,31);clrscr();
window(1,1,80,50);
gotoxy(50,24+3);
cout<<"By Cash";
gotoxy(50,24+4);
cout<<"To Account";
gotoxy(50,24+5);
cout<<"To Withdraw";
gotoxy(50,24+6);
cout<<"To Self";
gotoxy(50,24+7);
cout<<"To Person";
gettext(50,24,60,36,sfk);
}
voidscredepo()
{
window(50,27,60,34);clrscr();
window(1,1,80,50);
gotoxy(50,24+3);
cout<<"By Cash";
gotoxy(50,24+4);
cout<<"From Cheque ";
gotoxy(50,24+5);
cout<<"By Person";
gotoxy(50,24+6);
cout<<"From NRE";
gotoxy(50,24+7);
cout<<"By Interest";
gotoxy(50,24+8);
cout<<"By Clearing";
gotoxy(50,24+9);
cout<<"By BF";
gotoxy(50,24+10);
cout<<"By Salary";
gettext(50,24,60,36,sfk);
}
voidfixed()
{
if(tracc()==3||tracc()==4)
{
name(na);
edit.open(na,ios::in);
edit>>dd>>mm>>yy>>per>>d>>ln;
edit.close();
if((yearr-yy)<=per) d=(d*(yearr-yy)*ln)/100;
edit.open(na,ios::out);
edit<<dd<<"n"<<mm<<"n"<<yy<<"n"<<per<<"n"<<d<<"n"<<ln;
edit.close();
}
}
voidloaned()
{
fixit();
table.open("C:bankingRates.bank",ios::in);
table.seekg(52);
table>>sb>>cd>>f1>>f2>>f3>>f4>>f5>>f6>>l1>>l2>>l3;
table.close();
textattr(YELLOW);
cout<<"nnt 1. 1 yearto lessthan2 years "<<l1<<"%";
cout<<"nnt 2. 2 yearsto lessthan3 years "<<l2<<"%";
cout<<"nnt 3. 3 yearsandabovett "<<l3<<"%";
getch();
fixout();
}
voidfdloan(int io=0)
{
floatg=0,k=0;
d=ln=per=0;
if(!io) name(na);
edit.open(na,ios::in);edit>>dd>>mm>>yy>>per>>d>>ln;
if(edit.bad()||!ln)
{
textattr(RED+BLINK);gotoxy(1,20);
cprintf("nnLoanrecordsMissingnnSKIPPINGtoMenu!!!");
edit.close();return;
}
g=(d*pow(1+(ln/100),per));
k=d/100*ln;
cout<<"Loan Amountttt"<<d<<"nnLoanPeriodttt"<<per<<"Years"
<<"nnLoaninterestedratett"<<ln<<"%"
<<"nnLoaninterestedforthisyeart"<<k
<<"nnTotal loanamountpayable tontdispose thisyeart"<<d+k
<<"nnInterestafterloanperiodt"<<g-d
<<"nnAmountpayable after"<<per<<"Yearst"<<g;
}
char* name(charna[90])
{
strcat(na,".tra");
strcat(kna,na);
strcpy(na,kna);
strcpy(kna,"C:BankingSactions");
}
voidrepairlab(intget)
{
int noche;
window(1,1,80,22);
while(get!=5)
{
textbackground(BLUE);
clrscr();
gotoxy(17,3);
textcolor(RED+BLINK);
cprintf("YOUHAVEUNLOCKEDTHE UNDERWORLD ZONE");
gotoxy(15,4);
textbackground(GREEN);
textcolor(WHITE);
cprintf("tt ttnr");
textcolor(BLACK);
textbackground(3);
gotoxy(17,5);
cprintf("--The Complete CheatcomRepairlab--");
textcolor(4);
textbackground(9);
cprintf("nnrOperationsforfirstrunnr");
textcolor(YELLOW);
cprintf("nnnnr1.Operation1(I.M.C)nr");
cprintf("2.Operation2(G.F.M)nr3.About menr4.Operation4(D.P.L)nr5.Skipnr6.Exitfrom
programnr");
cin>>get;
cout<<"n";
if(get==1)
{
textbackground(GREEN);clrscr();
inters(1);
cprintf("nOperation1Sucessfull!nrGraphicsMode initilised");
}
else if(get==2)
{
endfil=1;
cprintf("nOperation2Sucessfull!");
}
else if(get==3)
{
textbackground(RED);
gotoxy(0,20);
cprintf("nIamUjjaystudyinginXIIsc,Oriental EnglishMediumSchool Pauvizhal.");
cprintf("nrIhave workedforthisasmyschool computerproject.Althoughthis");
cprintf("programisa betaversionforme.But it can provide all sortsof simple");
cprintf("bankingtechniques.The calculationall i appliediswhichi studied inmy");
cprintf("laterclasses.Idon'treferanybankingsubjects.Alsoi amnot a commerce");
cprintf("student.Thisimperfectionyoucanvisualize inthisprogram.nrPlease");
cprintf("forwardall yourfeedbackstomy number.n");
cprintf("nnrContactme atnrujjay@rediffmail.comnrRingme atnr9496351021");
getch();
}
else if(get==4)
{ return;
char all[4096];
ifstreamcheck;
check.open("C:bankingdatabase.dat",ios::in);
textcolor(GREEN);
clrscr();cout<<"PROF.DAT";
if(!matx_check("prof"))getch();
cout<<"nDisplaying1n";
for(inth=0;!check.eof(),h<200;h++)
{
sound(300);
check>>all;
cout<<all<<"tEnd of line "<<h<<"n";
delay(100);
}
nosound();
getch();
check.open("C:bankingacco.dat",ios::in);
clrscr();cout<<"ACCO.DAT";
if(!matx_check("acco"))getch();
cout<<"nDisplaying2n";
for(h=0;!check.eof(),h<200;h++)
{
sound(300);
check>>all;
cout<<all<<"tEnd of line "<<h<<"n";
delay(100);
}
nosound();
getch();
check.open("C:bankingacc.dat",ios::in);
clrscr();cout<<"ACC.DAT";
if(!matx_check("acc"))getch();
cout<<"nDisplaying2n";
for(h=0;!check.eof(),h<200;h++)
{
sound(300);
check>>all;
cout<<all<<"tEnd of line "<<h<<"n";
delay(100);
}
nosound();
getch();
} else if(get==5) window(1,1,80,50);
else if(get==6) exit(0);
else cout<<"nnBadcommandn";
}
}
floatinters(inte)
{
int bal[12][12],mar,ras,nce=0;
floatrated,inte;chargwd[30];
for(ras=0;ras<3;ras++)
{
for(mar=0;mar<13;mar++)
bal[ras][mar]=0;
}
if(mnu==7) gotoedt;
cprintf("nnrPleasebe standbywhile calculatingthe annual income forS.B& C.DAccounts");
prof.open("C:bankingAccounts.bank",ios::in);
while(!prof.eof())
{
gotoxy(1,42);
loderunner(prof.eof());
raed:
prof>>gud>>gwd>>gud>>gud>>gud>>gud>>gud>>totacc>>na>>occ>>h1>>h2>>
po>>dt>>ct>>ph>>tp>>dd>>mm>>yy;
if(strcmp(gwd,"account")){if(!prof.eof())gotoraed;else break;}
if(tp=='l'||tp=='f') fixed();
edt:
name(na);edit.close();
edit.open(na,ios::in);
if(edit.bad()) { cout<<"nAccountFile "<<na<<"missing";gotoraed;}
else if(edit.good())
{
do
{
edit>>dd>>mm>>yy>>rap>>par>>k>>w>>d>>b;
if(dd<10)
{
bal[0][mm]=b;
}
else
{
if(!bal[1][mm]||b<bal[1][mm])
{
bal[1][mm]=b;bal[0][mm]=0;
}
}
}while(!edit.eof());edit.close();
for(ras=0;ras<3;ras++)
{
for(mar=0;mar<13;mar++)
nce+=bal[ras][mar];
}
table.open("C:bankingRates.bank",ios::in);
table.seekg(52);table>>sb>>cd;table.close();
if(tp=='s') rated=sb;
if(tp=='c') rated=cd;
inte=(nce*rated)/1200;
if(e)
{
if(tp=='s') {d=inte;w=0;b=b+inte;}
if(tp=='c') {w=inte;d=0;b=b-inte;}
edit.close();
}
edit.open(na,ios::app);
edit<<"n10n3n"<<yearr<<"nAnnual Interestn"
<<k+1<<"n"<<w<<"n"<<d<<"n"<<b;
if(mnu==7) break;
}
} nosound();getch();
}
loanscheme()
{
loaned();
gotoxy(1,31);
cout<<"nnEnterthe loanperiod___________Yearsn";
gotoxy(27,33);cin>>per;
gotoxy(1,34);
cout<<"nEnterthe loanamount___________";cin>>d;
if(per>=1&&per<2) ln=l1;
if(per>=2&&per<3) ln=l2;
if(per>=3) ln=l3;
cout<<"nThe calculatedrate forthis"
<<"nnperiod_________";cout<<ln;cout<<"%";
gotoxy(7,1);
}
int tracc()
{
int acc2,acc1;
gotoxy(1,45);
cin>>acc1;
if(acc1==0)
{
gotoxy(1,45);
cout<<"2008-1678-";
acc1=2008;acc2=1678;
cin>>acc;
}
else
{
gotoxy(5,45);
cout<<"-";
gotoxy(6,45);
cin>>acc2;
gotoxy(10,45);
cout<<"-";
cin>>acc;
}
if(acc1==2008)
{
if(acc2==1678)
{
matx.open("C:bankingAccounts.bank",ios::in);
matx.seekg(acc); gotoxy(1,8);
matx>>gud>>totacc>>na>>occ>>h1>>h2>>
po>>dt>>ct>>ph>>tp>>dd>>mm>>yy;
matx.close();
if(dd==0)
{
gotoxy(3,20);
cprintf("Currentlynoprofilescorresponds"
" tothis accountnumberor");
gotoxy(3,22);
cprintf("nr Nodatapinnedinour registryatall");
return 0;
}
if(!strcmp("Newaccount",gud))
{
if(tp=='l'){strcpy(acctp,"Loan");return4;}
else if(tp=='s'){strcpy(acctp,"SavingsBank");return1;}
else if(tp=='c'){strcpy(acctp,"CurrentBank");return2;}
else if(tp=='f'){strcpy(acctp,"FixedAccount");return3;}
}
}
cout<<"nnThe account"<<acc1<<"-"<<acc2<<"-"<<acc<<" neverexists!!!";
getch();
return65;
}
}
int matx_check(charr[70])
{
char inn;
puttext(59,8,80,12,erropen);
textcolor(GREEN);
textbackground(RED);
gotoxy(59,8);
if(prof.bad())
{
gotoxy(1,40);
cprintf("Cannotcreate aAccountnErrorin openingafile");
cprintf("nnrRunfirstrunclearencenr");
perror("Acco.ban");
cprintf("Cannotopenafile");
gotoxy(59,10);
cprintf("Pressytoexit");
gotoxy(59,11);
cprintf("Else othertocontinue");
gotoxy(62,12);
cin>>inn;
if(inn=='y'||inn=='Y') exit(0);
return0;
}
else
{
cprintf("File opened");
gotoxy(62,10);
cprintf("sucessfully");
getch();
return1;
}
}
voidperioder()
{
cout<<"nnt";cprintf("DURATION");cout<<"ttt";cprintf("OLDRATEn");
cout<<"nnt1.15 days and upto45 dayst"<<f1<<"%tNA";
cout<<"nnt2.46 days and upto179 dayst"<<f2<<"%tNA";
cout<<"nnt3.180 daysand upto1 yeart"<<f3<<"%tNA";
cout<<"nnt4.1 yearto lessthan2 yearst"<<f4<<"%t"<<l1<<"%";
cout<<"nnt5.2 yearsto lessthan3 yearst"<<f5<<"%t"<<l2<<"%";
cout<<"nnt6.3 yearsand abovett"<<f6<<"%t"<<l3<<"%";
}
findcode(charcode[90])
{
bankingk;
char fch1[10],fch2[90];intposd;
prof.close();
prof.open("C:bankingAccounts.bank",ios::in);
while(!prof.eof())
{
posd=0;
prof>>fch1;
if(!strcmpi(fch1,code))
{
posd=prof.tellg();
if(posd<150)
prof.seekg(posd-50);
else prof.seekg(posd-100);
while(prof.tellg()!=posd)
{
prof>>fch2;
if(!strcmpi(fch2,"Newaccount")) break;
}
posd=prof.tellg();
prof>>acc>>na>>occ>>h1>>h2>>
po>>dt>>ct>>ph>>tp>>dd>>mm>>yy;
endfil=prof.tellg();
if(tp=='s')strcpy(acctp,"SavingsBank");
else if(tp=='c')strcpy(acctp,"CurrentBank");
else if(tp=='f')strcpy(acctp,"FixedAccount");
else if(tp=='l')strcpy(acctp,"Loan");
textbackground(13);clrscr();
gotoxy(7,1);endfil=0;
cout<<"ntttProfileLoadedas....nttt-------------------";
k.profview();returnposd;
}
}cout<<"ntSorryCode '"<<code<<"' not Found!!!";return0;
}
};
classbanking:publicbackgrounds
{
public:
banking() //Constructor
{
floatrop;
matx.open("C:bankingBase.bank",ios::in,ios::binary);
matx>>d2>>m2>>y2;
matx.close();
if(month<=3)
{
if(yearr>y2)
{
clrscr();textattr(WHITE);
cprintf("nr March day check ");
inters(1);
matx.open("C:bankingBase.bank",ios::out);
matx<<dayy<<"t"<<month<<"t"<<yearr<<"t"<<q;
matx.close();clrscr();
}
}
textcolor(RED);
cprintf("nrToday'sdate");
cout<<"tttttt"<<dayy;
cprintf("");
cout<<month;
cprintf("");
cout<<yearr;
textcolor(q+2);
}
voidprofaccept()
{
textcolor(YELLOW);textbackground(BLUE);clrscr();
gotoxy(7,1);
if(mnu!=9)cout<<"ntttCreate anAccountnttt-------------------";
else cout<<"ntttApplicationforaLoannttt------------------------";
cout<<"nnnAccountancy'sName--------------nnOccupation-----";
cout<<"-----------------nnAddressnntHouse FirstName--------";
cout<<"nntHouse SecondName-------nntPostbox----------------";
cout<<"nntDistrict----------------nnCity---------------------";
cout<<"-------nnPhone number--------------------nnDatentdd----------------------nntmm";
cout<<"----------------------nntyyyy--------------------nn";
cout<<"Account type--------------------";
if(mnu==9) cout<<"LOAN";
else cout<<"nnAmount--------------------------";
gotoxy(30,45);
cout<<"nREMEMBER NOSPACESARE ALLOWDED ON PROFILEn";
gotoxy(33,6);
gets(na);
gotoxy(33,8);
gets(occ);
gotoxy(33,12);
gets(h1);
gotoxy(33,14);
gets(h2);
gotoxy(33,16);
gets(po);
gotoxy(33,18);
gets(dt);
gotoxy(33,20);
gets(ct);
gotoxy(33,22);
gets(ph);
gotoxy(40,24);
textattr(-3);
cprintf("Yto Insertthe date");
cout<<" "<<dayy<<"-"<<month<<"-"<<yearr;
gotoxy(40,26);
cprintf("Else othertoaddanother");
gotoxy(40,28);
getop=getch();
if(getop=='y'||getop=='Y')
{
gotoxy(33,25);
cout<<dayy;
gotoxy(33,27);
cout<<month;
gotoxy(33,29);
cout<<yearr;
dd=dayy;mm=month;yy=yearr;
}
else
{
gotoxy(33,25);
cin>>dd;
gotoxy(33,27);
cin>>mm;
gotoxy(33,29);
cin>>yy;
}
if(mnu!=9)
{
Account_type();textattr(GREEN);
gotoxy(33,33);
}
if(tp=='l'||tp=='L') loanscheme();
else cout<<d;
if(prof.good())
if(mnu!=9)
{
gotoxy(1,40);
cprintf("Youraccounthave beensucessfullycreated");
cprintf("nnrYouraccountnumberis");cout<<" 2008-1678-"<<acc;
}
}
voidprofview()
{
gotoxy(5,45);
cout<<"nViewingACno:2008-1678-"<<acc<<"n";
gotoxy(1,3);
cout<<"nnnAccountancy'sName--------------nnOccupation-----";
cout<<"-----------------nnAddressnntHouse FirstName--------";
cout<<"nntHouse SecondName-------nntPostbox----------------";
cout<<"nntDistrict----------------nnCity---------------------";
cout<<"-------nnPhone number--------------------nnType of account";
cout<<"-----------------nnDate of creationof accountntdd----------------------nntmm";
cout<<"----------------------nntyyyy--------------------nn";
gotoxy(33,6);
cout<<na;
gotoxy(33,8);
cout<<occ;
gotoxy(33,12);
cout<<h1;
gotoxy(33,14);
cout<<h2;
gotoxy(33,16);
cout<<po;
gotoxy(33,18);
cout<<dt;
gotoxy(33,20);
cout<<ct;
gotoxy(33,22);
cout<<ph;
gotoxy(33,24);
cout<<acctp;
gotoxy(33,27);
cout<<dd;
gotoxy(33,29);
cout<<mm;
gotoxy(33,31);
cout<<yy;
getch();
}
voidediting()
{
screeninge;
int diffy,bal,res,acc3;charede,fna[90];
textbackground(BLUE);
textcolor(YELLOW);
strcpy(fna,na);
ed:clrscr();
if(endfil==1){carre(1);numbe(1);}
else if(!endfil){numbe();carre();}
e.showlasttrans();
gotoxy(42,4);
cout<<"Date of processingof account";
gotoxy(44,6);cout<<"dd-------";
gotoxy(44,8);cout<<"mm-------";
gotoxy(44,10);cout<<"yyyy-----";
gotoxy(48,12);
cprintf("Yto Insertthe date ");
cout<<dayy<<"-"<<month<<"-"<<yearr;
gotoxy(48,14);
cprintf("Else othertoaddanother");
gotoxy(54,6);
getop=getch();
if(getop=='y'||getop=='Y')
{
gotoxy(54,6);
cout<<dayy;
gotoxy(54,8);
cout<<month;
gotoxy(54,10);
cout<<yearr;
d1=dayy;
m1=month;
y1=yearr;
}
else
{
gotoxy(54,6);
cin>>d1;
gotoxy(54,8);
cin>>m1;
gotoxy(54,10);
cout<<yearr;
}
getch();
gotoxy(42,20);
cprintf("Whichtabdoyouwantto edit");
gotoxy(42,22);
cout<<"1.Withdrawal";
gotoxy(42,24);
cout<<"2.Deposit";
gotoxy(42,27);
cin>>type;
edit.close();
edit.open(na,ios::app,ios::end);
if(type==1)
{
e.withdrawing();
}
else if(type==2)
{
e.depositing();
}
else
{
gotoxy(42,29);
cout<<"Wrong choice";
}
if(can!=1)
edit<<"n"<<d1<<"n"<<m1<<"n"<<yearr<<"n"<<rap<<"n"
<<par<<"n"<<k<<"n"<<w<<"n"<<d<<"n"<<b;
gotoxy(42,30);closegraph();
cout<<"Entery if more";
gotoxy(42,31);
cin>>ede;if(ede=='y')
{
edit.close();
strcpy(na,fna);
goto ed;
}
edit.close();
}
};
classscreening:publicbackgrounds
{
public:
screening() //Constructor
{
textbackground(GREEN);
textcolor(GREEN);
clrscr();
textcolor(BLUE);
gotoxy(10,2);
cprintf("nntttttTHE");
textcolor(RED);
cprintf("SEGNETDECCAN ");
textcolor(BLUE);
cprintf("BANKMAHARASTRA L.T.Dttttt");
cout<<" ";
textbackground(12);
gotoxy(8,4);
cprintf("n ");
gotoxy(44,44);
textcolor(23);
textbackground(GREEN);
cprintf("A programby");
textcolor(12);
gotoxy(46,46);
cprintf("UJ J A Y U D A Y A B H A N U");
getch();
}
voiddepositing()
{
gotoxy(42,15);
cout<<"DepositAmount ";
cin>>d;
gotoxy(4,28+n);
cout<<d;
w=0;++k;
balancing();particulars();
}
voidwithdrawing()
{
gotoxy(42,16);
if(b<=274)
{ textattr(WHITE+BLINK);
cprintf("Youcan'tmake a withdrawl when");
gotoxy(42,18);
cprintf("the balance islessthanRs 275-");
textcolor(YELLOW);
can=1;
edit.close();
}
else
{
gotoxy(42,13);
d=0;++k;
gotoxy(42,15);
cout<<"Withdrawal Amount ";
cin>>w;
if(w<(b+274)||(b-w)>274)
{
gotoxy(29,k+4);
cout<<w;
balancing();particulars();
}
else
{
gotoxy(42,22);
cout<<"Itsnot applicable Withdrawlexceedscurrentbalance";
edit.close();
gotoxy(42,24);
cout<<"Minimumbalance of 274- is needed";
}
}
}
particulars(void)
{
gotoxy(50,36);cprintf("Pressnumericpad8 to move up");
gotoxy(50,38);cprintf("Pressnumericpad2 to move down");
gotoxy(50,40);cprintf("Pressnumericpad5 to select");
wittwain();
}
voidbalancing()
{
b+=d-w;
gotoxy(15,28+n);
cout<<b;
gotoxy(3,n+4);
cout<<d1<<"-"<<m1<<"-"<<yearr;
}
voidshowlasttrans()
{
sload:
strcpy(fna,na);
name(na); edit.open(na,ios::in);
if(edit.bad())
{
if(iup){ gotoxy(42,39);cout<<"Trycreatingafolder"<<kna;}
iup++;
gotoxy(42,35);
cout<<"Datas of earliertransactionmissing";
gotoxy(42,37);
cprintf("Wouldyoulike tocreate NEW? YN ");
cin>>getop;
if(getop=='Y'||getop=='y')
{
edit.open(na,ios::out);w=0;edit.close();return;
}
else if (getop=='N'||getop=='n')
{
gotoxy(42,44);
cprintf("Errorinopeningafile");
gotoxy(42,46);cprintf("Pressanytoskip...");
getch();main();
}
else {gotoxy(42,33);cout<<" Sorrywrongchoice "; goto sload;}
}
gotoxy(45,41);cout<<"Name "<<fna;
gotoxy(45,43);cout<<"Type of Account"<<acctp;
gotoxy(45,45);cout<<"Accountno2008-1678-"<<acc;
gotoxy(45,2);cprintf("PA G E 1");
for(n=1;!edit.eof();n++)
{ if(!(n%21))
{
getch();
window(1,1,40,52);textbackground(RED);
clrscr();numbe();carre();
gotoxy(45,2);cprintf("PA GE ");gotoxy(54,2);cout<<(n/21)+1;
window(1,1,80,50);n=1;
}
edit>>dd>>mm>>yy>>rap>>par>>k>>w>>d>>b;
gotoxy(3,n+4);
cout<<dd<<"-"<<mm<<"-"<<yy;
gotoxy(4,n+28);
gotoxy(15,n+4);
cout<<rap<<" "<<par;
gotoxy(4,n+28);
if(d==0) cout<<"-";
else
cout<<d;
gotoxy(15,n+28);
if(b==0) cout<<"-";
else
cout<<b;
gotoxy(29,n+4);
if(w==0) cout<<"-";
else
cout<<w;
}
n=n-1;
gotoxy(3,n+4);
cout<<"tt" ;
gotoxy(4,n+28);
cout<<"tt";
gotoxy(15,n+28);
cout<<"tt";
gotoxy(29,n+4);
cout<<"tt";
//if(k==0) cout<<"Nothingtodisplay";
edit.close();
}
};
voidmain()
{
clrscr();
backgroundsdw;
screeningc;
bankingbw;
int r,link,acc3;
textbackground(BLUE);
clrscr();
textcolor(GREEN+BLINK);
cout<<"ntttt";
cprintf("Menunr");
cout<<"tttt";
textbackground(14);
cprintf(" ");
textcolor(RED);
textbackground(BLACK);
cprintf("nnr1.Create new accountprofile.nnr2.View anaccountprofile.nnr");
cprintf("3.Search, Editor Remove profiles.nnr4.Processingan");
cprintf("SavingsbankorCurrentaccount.nnr5.Show transactionsof a account.nnr");
cprintf("6.Viewpresentrate of interest.nnr7.Change the persent");
cprintf("rate of interest.nnr8.Viewtotal balanc");
cprintf("e of accountancy.nnr9.Takinga loan.nnr10.Renual");
cprintf("of a loanaccount.nnr11.Checkloanstatus.");
cprintf("nnr12.Viewtotal orstandardbankbalance.nnr13.Resetallnnr0.Exit");
gotoxy(1,35);
textbackground(CYAN);
cprintf(" ");
cprintf(" nnr");
textbackground(BLUE);
textcolor(YELLOW);
cout<<"tttt";
cprintf("Inputareannr");
cin>>mnu;
clrscr();
switch(mnu)
{
case 1:
prof.open("C:bankingAccounts.bank",ios::app,ios::end);
prof<<"nNewaccounthascreatedat "<<dayy<<"-"<<month<<"-"<<yearr<<"n";
if(dw.matx_check("Acco.bank"))
{
acc=prof.tellp();
bw.profaccept();
prof<<"Newaccountn"<<acc<<"n"<<na<<"n"<<occ<<"n"<<h1<<"n"<<h2<<"n"
<<po<<"n"<<dt<<"n"<<ct<<"n"<<ph<<"n"<<tp<<"n"<<dd<<"n"<<mm<<"n"<<yy;
c.name(na);
edit.close();
edit.open(na,ios::out);
edit<<"n"<<dd<<"n"<<mm<<"n"<<yy;
if(tp=='l'||tp=='L'||tp=='F'||tp=='f')
edit<<"n"<<per<<"n"<<d<<"n"<<ln<<"n";
else
edit<<"nInitial Depon-1n"<<w<<"n"<<d<<"n"<<d;
edit.close();prof.close();
}
break;
case 2:
gotoxy(7,1);
textcolor(q+12);
prof.open("C:bankingAccounts.bank",ios::in);
if(dw.matx_check("prof"))
{
gotoxy(1,41);
cout<<"nnWhichprofile doyouwanttoviewn";
if(dw.tracc())
{
clrscr();
gotoxy(7,1);
cout<<"nttt";cprintf("ViewanProfile");
cout<<"nttt-----------------";
bw.profview();
gotoxy(5,45);
cout<<"nViewingACno:2008-1678-"<<acc<<"n";
}
prof.close();
}
break;
case 3:
char kore[90];intendu;
textattr(GREEN);
cprintf("nnnr1.SearchAnaccountnnr2.Editanaccountnn");
cprintf("r3.Remove aprofilennr");
cin>>remn;if(remn>3){cout<<"nWrongchoice";getch();break;}
rem:textbackground(12);textcolor(9);
clrscr();
gotoxy(7,1);
cout<<"ntttSearchaprofilenttt---------------------nnn";
cout<<"rSearchByntt1.ByName.ntt2.ByAccountnumber.ntt";
cout<<"3.By Phone bumberntt4.Orelse anycodesfromaccountprofilen";
cout<<"tt5.Enter0 or 'close'to skip!!!nn";
cin>>kore;
if(!strcmpi(kore,"close")||!strcmpi(kore,"0")) break;
cout<<"nnEnterthe code to findn";cin>>kore;
if(!strcmpi(kore,"close")||!strcmpi(kore,"0")) break;
totacc=dw.findcode(kore);
if(!totacc) {getch();prof.close();gotorem;}
endu=prof.tellg();
prof.close();textattr(YELLOW+BLINK);
if(totacc!=0)
cprintf("nnnnrPressFif foundnr");
getop=getch();
if(getop!='f'||getop!='F') getop=0;
else gotorem;
if(remn==2||remn==3)
{
gotoxy(1,38);textattr(RED);
cprintf("PLEASESTANDBY........nrwhiledeletingnr");
textbackground(RED);
cprintf(" nr ");
prof.open("C:bankingAccounts.bank",ios::in);
matx.open("C:bankingTemp.bank",ios::out);
if(totacc<55) totacc+=4;
while(prof.tellg()!=totacc)
{
prof.read(kore,1);
matx.write(kore,1);
}
if(remn==2)
{
char ame[90];strcpy(ame,na);strcpy(ame,".transaction");
bw.profaccept();matx.close();matx.open("C:bankingTemp.bank",ios::app);
matx<<"n"<<acc<<"n"<<na<<"n"<<occ<<"n"<<h1<<"n"
<<h2<<"n"<<po<<"n"<<dt<<"n"<<ct<<"n"<<ph<<"n"<<tp<<"n"
<<dd<<"n"<<mm<<"n"<<yy;
strcpy(na,".transaction");
rename(na,ame);
}
prof.seekg(endu);
matx.seekg(endu);
gotoxy(1,43);intxl=1;
while(!prof.eof())
{
prof.read(kore,1);
matx.write(kore,1);
dw.loderunner(prof.eof());
nosound();
}
gotoxy(1,38);
textattr(GREEN);
if(remn==2)
{
cprintf("EDITING........nr FINISHEDnr");
textbackground(GREEN);
cprintf(" nr ");
}
else if(remn==3)
{
gotoxy(1,43);xl=1;
dw.loderunner(prof.eof());
gotoxy(1,38);textattr(GREEN);
cprintf("DELETING........nr FINISHEDnr");
textbackground(GREEN);
cprintf(" nr ");
}
getch();
matx.close();prof.close();
remove("C:bankingAccounts.bank");rename("C:bankingTemp.bank","C:bankingAcco
unts.bank");
}
break;
case 4:
gotoxy(7,1);
textcolor(q+15);
cout<<"nttt";
cprintf("ProcessinganS.Bor C.D account");
cout<<"nttt----------------------------------";
gotoxy(1,41);
cout<<"nnWhichprofiledoyouwantto editn";
totacc=dw.tracc();
if(totacc==1||totacc==2)
bw.editing();
else
{
textattr(RED);sound(260);
cprintf("nnr You are supposedtoentera S.Bor C.Daccount number");
delay(5000);nosound();
}
break;
case 5:
gotoxy(7,1);
cout<<"nttt";
textcolor(q+22);
cprintf("Show Transactionof the account");
cout<<"nttt---------------------------------";
textcolor(q+17);
cprintf("nnrWhichaccountstransactionsare youwantto seernn");
gotoxy(1,43);
cout<<"Enterthe correct accoundno:-";
totacc=dw.tracc();
if(totacc==1||totacc==2)
{
if(!endfil){dw.numbe();dw.carre();}
else if(endfil==1){dw.carre(1);dw.numbe(1);}
c.showlasttrans();
matx.close();
}
else
{
textattr(RED);sound(200);
cprintf("nrYouare abouttoentera S.B or C.D account number");
delay(5000);nosound();
}
break;
case 6: case 7:
gotoxy(7,1);
char ch;
textbackground(RED);clrscr();
if(mnu!=6)
{
cout<<"ntttSetrate of interestnttt---------------------nnn";
textattr(6);textbackground(BLUE);
cprintf("1.Change interestrate forSavingsaccountnnr2.Changerate");
cprintf("of interestforcurrentdepositsnnr3.Changerate for");
cprintf("loaningnnr4.Change interestof Fixeddepositsnnr ");
}
else cout<<"ntttViewrate of interestnttt----------------------nnn";
textattr(10);
table.open("C:bankingRates.ban",::ios::in);
table.seekg(52);
table>>sb>>cd>>f1>>f2>>f3>>f4>>f5>>f6>>l1>>l2>>l3;table.close();
cprintf("nnrSavingsBanknnrOLDn%r");cout<<sb;
cprintf("nnrCurrentDepositnnrOLDn%r");cout<<cd;
textattr(WHITE);
cout<<"ttttt";cprintf("Fixed");
cout<<" ";cprintf("Loan");
textattr(5);
dw.perioder();
if(mnu==6) break;
gotoxy(1,14);cin>>ch;
if(ch=='1')
{ gotoxy(14,18);cprintf("NEWn%");
gotoxy(14,19);cin>>sb;
}
else if(ch=='2')
{ gotoxy(14,23);cprintf("NEWn%");
gotoxy(14,24);cin>>cd;
}
else if(ch=='4')
{ intchfd;
cprintf(" Whichtab inFD as givenBelow ");
cin>>chfd;
gotoxy(41,28);cprintf("NEWRATE");
switch(chfd)
{
case 1:
gotoxy(41,31);cin>>f1;
break;
case 2:
gotoxy(41,33);cin>>f2;
break;
case 3:
gotoxy(41,35);cin>>f3;
break;
case 4:
gotoxy(41,37);cin>>f4;
break;
case 5:
gotoxy(41,39);cin>>f5;
break;
case 6:
gotoxy(41,41);cin>>f6;
break;
}
}
else if(ch=='3')
{ intchfd;
gotoxy(3,14);cprintf("WhichtabinLoaningas givenBelow ");
cin>>chfd;
gotoxy(41,28);cprintf("NEWRATE");
switch(chfd)
{
case 1:
gotoxy(50,37);cin>>l1;
break;
case 2:
gotoxy(50,39);cin>>l2;
break;
case 3:
gotoxy(50,41);cin>>l3;
break;
}
}
table.open("C:bankingRates.ban",::ios::out);
table<<"SavingsBanktCurrentDepositnFixedDepositnLoaning";
{
table<<sb<<"tt";
table<<cd<<"n";
table<<f1<<"t";
table<<f2<<"t"<<f3<<"t"<<f4<<"t"<<f5<<"t";
table<<f6<<"n"<<l1<<"t"<<l2<<"t"<<l3<<"n";
table.close();
}
break;
case 8:
gotoxy(7,1);
cout<<"ntttAccountancy,scurrentbalancenttt-------------------------------";
gotoxy(1,41);
cout<<"nnEnterthe accountnumbern";
totacc=dw.tracc();
gotoxy(2,6);
cout<<"nnNamettt"<<na;
if(totacc==3) c.fdloan();
else if(totacc==4) c.fdloan();
else if(totacc==1||totacc==2)
{
c.showlasttrans();clrscr();
cout<<"nnnnAccountnott2008-1678-"<<acc;
cout<<"nnType of accounttt"<<acctp;
cout<<"nnnnThe currentaccountbalance istt"<<b;
cout<<"nnThe calulatedinterest";
if(totacc==1) cout<<" added";
else if(totacc==2) cout<<" deduced";
cout<<"after9 March of commingyearforthis"
<<" balance is"<<dw.inters(0);
}
break;
case 9:floatper,ln;
gotoxy(7,1);
cout<<"ntttApplicationforaLoannttt------------------------";
cout<<"nnFora loanyou have to fll the formnHere isthe rate chart";
table.open("C:bankingRates.ban",::ios::in);table.seekg(52);
table>>sb>>cd>>f1>>f2>>f3>>f4>>f5>>f6>>l1>>l2>>l3;table.close();
dw.fixit();
cout<<"nnt 1. 1 year to lessthan2 years "<<l1<<"%";
cout<<"nnt 2. 2 yearsto lessthan3 years "<<l2<<"%";
cout<<"nnt 3. 3 yearsand abovett "<<l3<<"%";
cout<<"nnnntttPRESSHTOLEAVEn";
getop=getch();
if(getop=='h'||getop=='H')
{dw.fixout();break;}
dw.fixout();
cout<<"ntttApplicationforaLoannttt------------------------";
prof.open("C:bankingAccounts.bank",ios::app,ios::end);
prof<<"nNewloan_formhascreatedat"<<dayy<<"-"<<month<<"-"<<yearr<<"n";
if(dw.matx_check("prof"))
{ floatper;
acc=prof.tellp();
bw.profaccept();c.loanscheme();
prof<<"nNewaccountn"<<acc<<"n"<<na<<"n"<<occ<<"n"<<h1<<"n"
<<h2<<"n"<<po<<"n"<<dt<<"n"<<ct<<"n"<<ph<<"nl"<<"n"
<<dd<<"n"<<mm<<"n"<<yy;
prof.close();
c.name(na);
edit.open(na,ios::out);
edit<<"n"<<dd<<"n"<<mm<<"n"<<yy<<"n"<<per<<"n"<<d<<"n"<<ln<<"n";
edit.close();
gotoxy(1,41);
cprintf("nnnnnnnNewLoanprofile hacreatedthe accountNumber is");
cout<<" 2008-1678-"<<acc;
}
prof.close();
break;
case 0:
gotoxy(22,22);textattr(RED);
cprintf("nExiting............tt");
getch();
exit(0);
case 10:case 11:
gotoxy(7,1);
cout<<"ntttLoanStatusnttt------------";
gotoxy(1,43);
cout<<"Enter the loanaccount number";
if(dw.tracc()==4)
{
cout<<"NAMEtttt"<<na<<"nn";
c.fdloan();
if(mnu==10)
{
floatv;
gotoxy(1,30);
cout<<"nEnterthe amountto payt";cin>>v;
if(v<=0)
{
textattr(YELLOW+BLINK);
cprintf("nnrSorrynotapplicablennSkippingtomenu");
}
edit.open(na,ios::in);edit>>dd>>mm>>yy>>per>>d>>ln;
edit.close();
d-=v;
edit.open(na,ios::out);
edit<<"n"<<dayy<<"n"<<month<<"n"<<yearr
<<"n"<<per<<"n"<<d<<"n"<<ln;edit.flush();edit.close();
gotoxy(1,10);c.fdloan(1);
}
}
else
{
gotoxy(1,20);
cout<<"nnYouare aboutto Enter a loanaccount numbern";
}
break;
case 12:
matx.open("C:bankingAccounts.bank",ios::in);
gotoxy(1,43);intd1,d2,d3,d4;
d1=d2=d3=d4=l1=f2=l3=l2=0;
do
{
dw.loderunner(matx.eof());
matx>>gud;
if(!strcmp("Newaccount",gud))
{
matx>>totacc>>na>>occ>>h1>>h2>>
po>>dt>>ct>>ph>>tp>>dd>>mm>>yy;
c.name(na);
edit.open(na,ios::in);
if(edit.good())
{
if(tp=='l')
{
edit>>dd>>mm>>yy>>per>>d1>>ln;
edit.close();
l2-=d1;
}
else if(tp=='s')
{
while(!edit.eof())
edit>>dd>>mm>>yy>>rap>>par>>k>>w>>d>>d2;
edit.close();
l1+=d2;
}
else if(tp=='c')
{
while(!edit.eof())
edit>>dd>>mm>>yy>>rap>>par>>k>>w>>d>>d3;
edit.close();
l3+=d3;
}
else if(tp=='f')
{
edit>>dd>>mm>>yy>>per>>d4>>ln;
edit.close();
f2+=d4;
}
}}}while(!matx.eof());
matx.close();
nosound();
gotoxy(1,5);
cout<<"nnTotal balance inS.Baccounts is"<<l1;
cout<<"nnTotal balance inC.Daccounts is"<<l3;
cout<<"nnTotal balance inF.Daccounts is"<<f2;
cout<<"nnTotal balance inLoanaccounts is"<<l2;
cout<<"nnTotal standardbalance "<<l1+f2+l3+l2;
l1=f2=l3=l2=0;
break;
case 13:
char reset;
gotoxy(7,1);
cout<<"ntttResetAllnttt-----------";
gotoxy(2,22);
cout<<"Do youwant to resetnnPressrtocontinuenn";
cin>>reset;
if(reset=='r'||reset=='R')
{
textbackground(BLUE);
prof.open("C:bankingAccounts.bank",ios::in);
gotoxy(1,30);
textattr(RED);
cprintf("PLEASESTANDBY........nrwhilerestoringnr");
textbackground(RED);
cprintf(" nr ");
gotoxy(1,43);
while(!prof.eof())
{
prof>>na;
c.name(na);
dw.loderunner(prof.eof());
edit.open(na,ios::out);
if(edit.good()) remove(na);
edit.close();
}
prof.close();
gotoxy(1,30);
textattr(GREEN);
cprintf("RESETEDANDRESTORED...nr FINISHEDnr");
textbackground(GREEN);
cprintf(" nr ");
nosound();
prof.open("C:bankingAccounts.bank",ios::out);
prof<<"1n";prof.close();
matx.open("C:bankingBase.bank",ios::out);
matx<<dayy<<"t"<<month<<"t"<<yearr<<"t"<<q;
matx.close();table.close();
table.open("C:bankingRates.bank",::ios::out);
table<<"SavingsBanktCurrentDepositnFixedDeposittLoaning";
table<<"4t4.5n5.25t6.5t5.7t8t8t8.5n5.5t7t8";
table.close();
}
break;
default:
cout<<"nnNolinkexistas"<<mnu;
break;
}
getch();
link:
textbackground(q+4);
clrscr();
gotoxy(22,22);
++q;
textattr(12);
cprintf("nrSelectone amoungnnr1.Linktomenunnr2.Exit........nnr");
cin>>link;
if(link==1)
main();
else if(link==2) exit(0);
else cout<<"nnttttWRONGLINK!!!";getch();gotolink;
}

More Related Content

What's hot

Data structure programs in c++
Data structure programs in c++Data structure programs in c++
Data structure programs in c++
mmirfan
 
All I know about rsc.io/c2go
All I know about rsc.io/c2goAll I know about rsc.io/c2go
All I know about rsc.io/c2go
Moriyoshi Koizumi
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
vinay arora
 
C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
vinay arora
 
Programs for Operating System
Programs for Operating SystemPrograms for Operating System
Programs for Operating System
LPU
 
5 1. character processing
5 1. character processing5 1. character processing
5 1. character processing
웅식 전
 
Cn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshanCn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshan
riturajj
 
Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop
Sages
 

What's hot (19)

Os 2 cycle
Os 2 cycleOs 2 cycle
Os 2 cycle
 
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
 
Data structure programs in c++
Data structure programs in c++Data structure programs in c++
Data structure programs in c++
 
Os lab 1st mid
Os lab 1st midOs lab 1st mid
Os lab 1st mid
 
The elements of a functional mindset
The elements of a functional mindsetThe elements of a functional mindset
The elements of a functional mindset
 
Leap Ahead with Redis 6.2
Leap Ahead with Redis 6.2Leap Ahead with Redis 6.2
Leap Ahead with Redis 6.2
 
Keynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics StudiesKeynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics Studies
 
All I know about rsc.io/c2go
All I know about rsc.io/c2goAll I know about rsc.io/c2go
All I know about rsc.io/c2go
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
 
lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegen
 
C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
 
Assignment6
Assignment6Assignment6
Assignment6
 
Programs for Operating System
Programs for Operating SystemPrograms for Operating System
Programs for Operating System
 
5 1. character processing
5 1. character processing5 1. character processing
5 1. character processing
 
Cn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshanCn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshan
 
Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop
 
Crabs dataset GLM Poisson and Logistic model
Crabs dataset GLM Poisson and Logistic modelCrabs dataset GLM Poisson and Logistic model
Crabs dataset GLM Poisson and Logistic model
 
Lab loop
Lab loopLab loop
Lab loop
 
Zarzadzanie pamiecia w .NET - WDI
Zarzadzanie pamiecia w .NET - WDIZarzadzanie pamiecia w .NET - WDI
Zarzadzanie pamiecia w .NET - WDI
 

Viewers also liked

Achillea millefolia web show
Achillea millefolia   web showAchillea millefolia   web show
Achillea millefolia web show
cvadheim
 
Batching and Incremental Build
Batching and Incremental BuildBatching and Incremental Build
Batching and Incremental Build
LearningTech
 
տեառնընդառաջ
տեառնընդառաջտեառնընդառաջ
տեառնընդառաջ
Mark Hovsepyan
 
Refacciones automotrices 2014
Refacciones automotrices 2014Refacciones automotrices 2014
Refacciones automotrices 2014
araceli2014
 

Viewers also liked (14)

The indicators-part-3
The indicators-part-3The indicators-part-3
The indicators-part-3
 
Cdr2015 classement 1er tour
Cdr2015   classement 1er tourCdr2015   classement 1er tour
Cdr2015 classement 1er tour
 
Política Educativa Fin de Siglo
Política Educativa Fin de SigloPolítica Educativa Fin de Siglo
Política Educativa Fin de Siglo
 
REDALYC - Etica y los agronegocios
REDALYC - Etica y los agronegociosREDALYC - Etica y los agronegocios
REDALYC - Etica y los agronegocios
 
Achillea millefolia web show
Achillea millefolia   web showAchillea millefolia   web show
Achillea millefolia web show
 
Batching and Incremental Build
Batching and Incremental BuildBatching and Incremental Build
Batching and Incremental Build
 
Virus y vacunas informáticas
Virus y vacunas informáticasVirus y vacunas informáticas
Virus y vacunas informáticas
 
Learn the secret of Currencies trading (for beginners).
Learn the secret of Currencies trading (for beginners).Learn the secret of Currencies trading (for beginners).
Learn the secret of Currencies trading (for beginners).
 
Seminar ppt
Seminar pptSeminar ppt
Seminar ppt
 
տեառնընդառաջ
տեառնընդառաջտեառնընդառաջ
տեառնընդառաջ
 
το μανιφέστο
το μανιφέστοτο μανιφέστο
το μανιφέστο
 
3 Highly Effective Litigation Skills to Leave at the Office
3 Highly Effective Litigation Skills to Leave at the Office3 Highly Effective Litigation Skills to Leave at the Office
3 Highly Effective Litigation Skills to Leave at the Office
 
Fx trading-e-book-part-1
Fx trading-e-book-part-1Fx trading-e-book-part-1
Fx trading-e-book-part-1
 
Refacciones automotrices 2014
Refacciones automotrices 2014Refacciones automotrices 2014
Refacciones automotrices 2014
 

Similar to include

ภาษาซีพื้นฐาน
ภาษาซีพื้นฐานภาษาซีพื้นฐาน
ภาษาซีพื้นฐาน
Krunee Thitthamon
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
kramsri
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
kramsri
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64
FFRI, Inc.
 
Project code for Project on Student information management system
Project code for Project on Student information management systemProject code for Project on Student information management system
Project code for Project on Student information management system
REHAN IJAZ
 

Similar to include (20)

ภาษาซีพื้นฐาน
ภาษาซีพื้นฐานภาษาซีพื้นฐาน
ภาษาซีพื้นฐาน
 
Os lab upto_1st_mid
Os lab upto_1st_midOs lab upto_1st_mid
Os lab upto_1st_mid
 
Os lab upto 1st mid
Os lab upto 1st midOs lab upto 1st mid
Os lab upto 1st mid
 
20141106 asfws unicode_hacks
20141106 asfws unicode_hacks20141106 asfws unicode_hacks
20141106 asfws unicode_hacks
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Introduction to Assembly Language
Introduction to Assembly LanguageIntroduction to Assembly Language
Introduction to Assembly Language
 
20DCE096_prac8.pdf
20DCE096_prac8.pdf20DCE096_prac8.pdf
20DCE096_prac8.pdf
 
Computer graphics programs in c++
Computer graphics programs in c++Computer graphics programs in c++
Computer graphics programs in c++
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
R/C++ talk at earl 2014
R/C++ talk at earl 2014R/C++ talk at earl 2014
R/C++ talk at earl 2014
 
week-22x
week-22xweek-22x
week-22x
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
C c++-meetup-1nov2017-autofdo
C c++-meetup-1nov2017-autofdoC c++-meetup-1nov2017-autofdo
C c++-meetup-1nov2017-autofdo
 
Sp ch05
Sp ch05Sp ch05
Sp ch05
 
Circular queue
Circular queueCircular queue
Circular queue
 
プログラム実行の話と
OSとメモリの挙動の話
プログラム実行の話と
OSとメモリの挙動の話プログラム実行の話と
OSとメモリの挙動の話
プログラム実行の話と
OSとメモリの挙動の話
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64
 
PBL1-v1-004j.pptx
PBL1-v1-004j.pptxPBL1-v1-004j.pptx
PBL1-v1-004j.pptx
 
String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString Manipulation Function and Header File Functions
String Manipulation Function and Header File Functions
 
Project code for Project on Student information management system
Project code for Project on Student information management systemProject code for Project on Student information management system
Project code for Project on Student information management system
 

include