You are on page 1of 54

#include<iostream.

h>
#include<fstream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<dos.h>
#include<errno.h>
#include<stddef.h>
#include<process.h>
char ch;
class deep_the_great
{
char mode[10];
char d[50];
char e[10];
char dd[5];
char mm[5];
char yy[5];
int way;
int ti_ch;
int p_ch;
int time;
int c_no;
long p_am;
long p_m_am;

//GLOBAL VARIABLE
//CLASS

int no_pay;
int no_p;
int ctr;
float pay_am;
char day[20];
char policy[20];
char name[20];
char sex[10];
char mar[20];
int age;
public:
void p_way();
void p_again1();
void view_policy();
void new_policy();
void p_det();
void p_again();
void p_again2();
void payments();
void ti();
void p_ams();
void exit();
void choice();
}deep,deep1;
void deep_the_great::ti()
{
clrscr();

int z;
gotoxy(15,2);
for(z=0;z<47;z++)
cout<<'*';
gotoxy(15,6);
for(z=0;z<47;z++)
cout<<'*';
for(z=0;z<4;z++)
{
gotoxy(15,3+z);
cout<<'*';
gotoxy(61,3+z);
cout<<'*';
}
gotoxy(28,4);
cout<<"LIC's policy duration";
gotoxy(14,9);
cout<<"please select time period for your policy:";
gotoxy(25,12);
cout<<"1).2-4 yrs";
gotoxy(25,13);
cout<<"2).4-6 yrs";
gotoxy(25,14);
cout<<"3).6-10 yrs";
gotoxy(25,15);
cout<<"4).10-14yrs";
gotoxy(25,16);

cout<<"5).14-20yrs";
gotoxy(25,17);
cout<<"6).20-25 yrs";
gotoxy(25,18);
cout<<"7).25-30 yrs";
gotoxy(25,19);
cout<<"8).30-40 yrs";
gotoxy(25,20);
cout<<"9).40-50 yrs";
gotoxy(25,21);
cout<<"10).50 yrs and above";
cout<<"\n\n\tEnter choice:";
cin>>ti_ch;
sound(1234);

//FOR SOUND OF DIFFERENT FREQUENCIES

delay(100);

//TO DELAY THE OUTPUT; TIME IN MILLISECONDS

sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);

//TO STOP SOUND

delay(100);
sound(4567);
delay(100);
nosound();
switch(ti_ch)

//SWITCH CASE

{
case 1: strcpy(e,"2-4yrs");break;
case 2: strcpy(e,"4-6yrs");break;
case 3: strcpy(e,"6-10yrs");break;
case 4: strcpy(e,"10-14yrs");break;
case 5: strcpy(e,"14-20yrs");break;
case 6: strcpy(e,"20-25yrs");break;
case 7: strcpy(e,"25-30yrs");break;
case 8: strcpy(e,"30-40yrs");break;
case 9: strcpy(e,"40-50yrs");break;
case 10: strcpy(e,"50yrs and above");break;
default:ti();
}
}
void loading()
{
clrscr();
int t;
gotoxy(15,20);
for(t=1;t<50;t++)
{
textcolor(7);

//FOR LOADING GRAPHICS

cprintf("-");
}
gotoxy(35,22);
textcolor(12);
cprintf("LOADING....");
gotoxy(15,20);
for(t=1;t<50;t++)
{
textcolor(12);
cprintf("-");
sound(t*100);
delay(100);
nosound();
}
textcolor(10+BLINK);
gotoxy(50,23);
cprintf("PRESS ANY KEY TO START");
getch();
textcolor(RED+7);
}

void deep_the_great::p_ams()
{
clrscr();
int z;
gotoxy(15,2);

for(z=0;z<47;z++)
cout<<'*';
gotoxy(15,6);
for(z=0;z<47;z++)
cout<<'*';
for(z=0;z<4;z++)
{
gotoxy(15,3+z);
cout<<'*';
gotoxy(61,3+z);
cout<<'*';
}
gotoxy(28,4);
cout<<"LIC's policy amounts";
gotoxy(12,8);
cout<<"please select the category for your policy amounts :";
gotoxy(24,11);
cout<<"1).10000-20000";
gotoxy(24,12);
cout<<"2).20000-50000";
gotoxy(24,13);
cout<<"3).50000-100000";
gotoxy(24,14);
cout<<"4).100000-200000";
gotoxy(24,15);
cout<<"5).200000-500000";
gotoxy(24,16);

cout<<"6).500000-1000000";
gotoxy(24,17);
cout<<"7).1000000-25000000";
gotoxy(24,18);
cout<<"8).2500000-50000000";
gotoxy(24,19);
cout<<"9).5000000-10000000";
gotoxy(24,20);
cout<<"10).10000000 and above";
gotoxy(15,23);
cout<<"Enter choice:";
cin>>p_ch;
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);

sound(4567);
delay(100);
nosound();
switch(p_ch)
{
case 1:strcpy(d,"10000-20000");break;
case 2:strcpy(d,"20000-50000");break;
case 3:strcpy(d,"50000-100000");break;
case 4:strcpy(d,"100000-200000");break;
case 5:strcpy(d,"200000-500000");break;
case 6:strcpy(d,"500000-1000000");break;
case 7:strcpy(d,"1000000-2500000");break;
case 8:strcpy(d,"2500000-5000000");break;
case 9:strcpy(d,"5000000-10000000");break;
case 10:strcpy(d,"10000000 and above");break;
default:p_ams();
}
}

void deep_the_great::payments()
{
char c;
int q,no,flag=0;
clrscr();
for(int i=0;i<2;i++)
{

delay(400);
sound(123);
delay(20);
sound(234);
delay(20);
sound(6784);
delay(100);
sound(5754);
delay(20);
sound(6544);
delay(20);
sound(23);
delay(20);
sound(34);
delay(20);
sound(4364);
delay(20);
sound(5435);
delay(100);
sound(6343);
delay(100);
}
sound(234);
delay(300);
sound(345);
delay(500);
nosound();

gotoxy(16,5);
for(int s=0;s<45;s++)
cout<<'*';
gotoxy(16,9);
for(int r=0;r<45;r++)
cout<<'*';
for(int e=0;e<4;e++)
{
gotoxy(16,6+e);
cout<<'*';
gotoxy(60,6+e);
cout<<'*';
}
gotoxy(23,7);
cout<<"WELCOME TO LIC's payment section";
gotoxy(6,12);
cout<<"Please enter your customer no.";
cin>>q;
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();

sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
ifstream f7;
f7.open("deepp.dat",ios::in|ios::binary);
while(!f7.eof())
{
f7.read((char*)&deep1,sizeof(deep_the_great));
no=deep1.c_no;
if(no==q)
{
flag=0;
break;
}
else
flag=1;
}
f7.close();
if(flag==1)
{
cout<<"\n\n\n\t\t\t\tSorry !!!\n\t\t\tNot a valid customer number";

sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
getch();
exit();
}
else
{
ofstream f1;
f1.open("deepp.dat",ios::ate|ios::binary|ios::out);
clrscr();
deep1.p_again2();

gotoxy(16,16);
cout<<"Policy amount:";
gotoxy(32,16);
cout<<deep1.p_am;
gotoxy(16,17);
cout<<"Time period(in years):";
gotoxy(40,17);
cout<<deep1.time;
getch();
clrscr();
gotoxy(16,5);
for(int s=0;s<45;s++)
cout<<'*';
gotoxy(16,9);
for(int r=0;r<45;r++)
cout<<'*';
for(int q=0;q<4;q++)
{
gotoxy(16,6+q);
cout<<'*';
gotoxy(60,6+q);
cout<<'*';
}
gotoxy(23,7);
cout<<"Welcome to LIC's PAYMENT section";
cout<<"\n\n\n\n\n\n\t\t Date of starting policy:"<<deep1.dd<<'-'<<deep1.mm<<''<<deep1.yy;

cout<<"\n\t\t\t Policy amount:"<<deep1.p_am;


cout<<"\n\t\t\tMaturity amount:"<<deep1.p_m_am;
getch();
if(deep1.no_pay==0)
{
deep1.p_way();
clrscr();
gotoxy(16,5);
for(int s=0;s<45;s++)
cout<<'*';
gotoxy(16,9);
for(int r=0;r<45;r++)
cout<<'*';
for(int q=0;q<4;q++)
{
gotoxy(16,6+q);
cout<<'*';
gotoxy(60,6+q);
cout<<'*';
}
gotoxy(23,7);
cout<<"Welcome to LIC's PAYMENT section";
cout<<"\n\n\n\n\n\t\tYour premium for the policy is:Rs"<<deep1.pay_am;
cout<<"\n\t\t\t Total no of deposits:"<<deep1.no_p;;
cout<<"\n\t\t\t No of deposits paid:"<<deep1.no_pay;
cout<<"\n\t\t\t Way of paying:"<<deep1.mode;
}

else
{
clrscr();
gotoxy(16,5);
for(int s=0;s<45;s++)
cout<<'*';
gotoxy(16,9);
for(int r=0;r<45;r++)
cout<<'*';
for(int q=0;q<4;q++)
{
gotoxy(16,6+q);
cout<<'*';
gotoxy(60,6+q);
cout<<'*';
}
gotoxy(23,7);
cout<<"Welcome to LIC's PAYMENT section";
cout<<"\n\n\n\n\n\t\tYour premium for the policy is: Rs"<<deep1.pay_am;
cout<<"\n\t\t\t Total no of deposits :"<<deep1.no_p;
cout<<"\n\t\t\t No of deposits paid:"<<deep1.no_pay;
cout<<"\n\t\t\t Way of paying:"<<deep1.mode;
if(deep1.no_p==deep1.no_pay)
{
clrscr();
int z;
gotoxy(15,2);

for(z=0;z<47;z++)
cout<<'*';
gotoxy(15,6);
for(z=0;z<47;z++)
cout<<'*';
for(z=0;z<4;z++)
{
gotoxy(15,3+z);
cout<<'*';
gotoxy(61,3+z);
cout<<'*';
}
gotoxy(27,4);
cout<<"Your policy has matured";
gotoxy(26,8);
cout<<"Starting date:"<<deep1.dd<<'-'<<deep1.mm<<'-'<<deep1.yy;
gotoxy(28,9);
cout<<"Policy amount:"<<deep1.p_am;
gotoxy(27,10);
cout<<"Maturity amount:"<<deep1.p_m_am;
gotoxy(14,14);
cout<<"You can collect your maturity amount from front office";
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);

delay(100);
sound(4567);
delay(100);
nosound();
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
getch();
}//end of(if) if policy has matured
}//endofelse
cout<<"\n\n\n\tPress '+' for depositing money and '@'for withdrawing:";
cin>>c;
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();

sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
switch(c)
{
case('+'):
cout<<"\n\n\t\t\tPremium paid....\n\t\t\t Thank You!!!\n";
deep1.no_pay=deep1.no_pay+1;
f1.seekp(-205,ios::cur);
f1.write((char*)&deep1,sizeof(deep_the_great));
f1.close();
getch();
choice();
break;
case('@'):
clrscr();
int z;
gotoxy(15,2);
for(z=0;z<47;z++)
cout<<'*';
gotoxy(15,6);

for(z=0;z<47;z++)
cout<<'*';
for(z=0;z<4;z++)
{
gotoxy(15,3+z);
cout<<'*';
gotoxy(61,3+z);
cout<<'*';
}
gotoxy(27,4);
cout<<"Your policy has matured";
gotoxy(26,8);
cout<<"Starting date :"<<deep1.dd<<"-"<<deep1.mm<<"-"<<deep1.yy;
gotoxy(28,9);
cout<<"Policy amount:"<<deep1.p_am;
gotoxy(27,10);
cout<<"Maturity amount:"<<deep1.p_m_am;
gotoxy(14,14);
cout<<"You can collect youur maturity amount from front office";
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);

nosound();
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
getch();
exit();
break;
default:cout<<"Deep is great";
}
}
}
void deep_the_great::p_way()
{
clrscr();
gotoxy(15,7);
for(int i=0;i<16;i++)
cout<<'*';
gotoxy(31,7);
cout<<" LIC ";
gotoxy(40,7);
for(int a=0;a<15;a++)

cout<<'*';
gotoxy(15,20);
for(int j=0;j<40;j++)
cout<<'*';
for(int w=0;w<12;w++)
{
gotoxy(15,8+w);
cout<<'*';
gotoxy(54,8+w);
cout<<'*';
}
gotoxy(20,10);
cout<<"Select way of depositing money";
gotoxy(29,13);
cout<<"1).monthly";
gotoxy(29,14);
cout<<"2).quarterly";
gotoxy(29,15);
cout<<"3).Half yearly";
gotoxy(29,16);
cout<<"4).Yearly";
gotoxy(28,18);
cout<<"Enter choice:";
gotoxy(44,18);
cin>>way;
sound(1234);
delay(100);

sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
switch(way)
{
case 1:
deep1.pay_am=deep1.p_am/(deep1.time*12);
deep1.no_p=deep.time*12;
strcpy(mode,"Monthly");
break;
case 2:
deep1.pay_am=deep1.p_am/(deep1.time*4);
deep1.no_p=deep1.time*4;
strcpy(mode,"Quarterly");

break;
case 3:
deep1.pay_am=deep1.p_am/(deep1.time*2);
deep1.no_p=deep1.time*2;
strcpy(mode,"Half yearly");
break;
case 4:
deep1.pay_am=deep1.p_am/deep1.time;
deep1.no_p=deep1.time;
strcpy(mode,"Yearly");
break;
default:p_way();
}//end of switch
}
void deep_the_great::exit()
{
clrscr();
int a;
gotoxy(16,8);
for(int s=0;s<45;s++)
cout<<'*';
gotoxy(16,16);
for(int r=0;r<45;r++)
cout<<'*';
for(int q=0;q<8;q++)
{
gotoxy(16,9+q);

cout<<'*';
gotoxy(60,9+q);
cout<<'*';
}
gotoxy(23,11);
cout<<"Thank you for using this program";
gotoxy(23,13);
cout<<"Good bye and have a nice day";
delay(300);
for(a=1;a<20;a++)
{
sound(a*100);
delay(100);
}
sound(234);
delay(1000);
sound(345);
delay(1000);
sound(456);
delay(1000);
sound(567);
delay(1000);
sound(678);
delay(500);
sound(234);
delay(500);
sound(345);

delay(500);
sound(456);
delay(500);
sound(567);
delay(500);
sound(678);
delay(250);
sound(234);
delay(250);
sound(345);
delay(250);
sound(456);
delay(250);
sound(567);
delay(250);
sound(678);
delay(250);
for(a=1;a<20;a++)
{
sound(a*100);
delay(100);
}
nosound();
delay(1500);
}
void deep_the_great::p_det()
{

clrscr();
int z;
gotoxy(13,2);
for(z=0;z<51;z++)
cout<<'*';
gotoxy(13,6);
for(z=0;z<51;z++)
cout<<'*';
for(z=0;z<4;z++)
{
gotoxy(13,3+z);
cout<<'*';
gotoxy(63,3+z);
cout<<'*';
}
gotoxy(18,4);
cout<<"LIC welcomes you for creating NEW POLICY";
gotoxy(20,7);
cout<<"enter date:";
gotoxy(35,7);
cout<<"DD:";
gotoxy(43,7);
cout<<"MM:";
gotoxy(51,7);
cout<<"YYYY:";
gotoxy(22,9);
cout<<"Please enter your details";

gotoxy(16,12);
cout<<"Name:";
gotoxy(16,13);
cout<<"Age:";
gotoxy(16,14);
cout<<"Sex:";
gotoxy(16,15);
cout<<"Marital status:";
delay(1000);
gotoxy(39,7);
cin>>dd;
gotoxy(47,7);
cin>>mm;
gotoxy(57,7);
cin>>yy;
sound(234);
delay(100);
sound(345);
delay(100);
sound(456);
delay(100);
sound(567);
delay(100);
nosound();
gotoxy(28,12);
fflush(stdin);
gets(name);

gotoxy(28,13);
fflush(stdin);
fflush(stdout);
cin>>age;
gotoxy(28,14);
gets(sex);
gotoxy(35,15);
gets(mar);
sound(1234);
delay(100);
sound(2345);
delay(1000);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
sound(1234);
delay(100);
sound(2345);
delay(1000);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
}

void deep_the_great::p_again()
{
int z;
clrscr();
gotoxy(15,2);
for(z=0;z<47;z++)
cout<<'*';
gotoxy(15,6);
for(z=0;z<47;z++)
cout<<'*';
for(z=0;z<4;z++)
{
gotoxy(15,3+z);
cout<<'*';
gotoxy(61,3+z);
cout<<'*';
}
gotoxy(22,4);
cout<<"Welcome to LIC's VIEW POLICY section";
gotoxy(28,9);
cout<<"Personal details:";
gotoxy(16,12);
cout<<"Name:"<<name;
gotoxy(16,13);
cout<<"Age:"<<age;
gotoxy(16,14);
cout<<"Sex:"<<sex;

gotoxy(16,15);
cout<<"Marital status:"<<mar;
}
void deep_the_great::p_again1()
{
int z;
clrscr();
gotoxy(15,2);
for(z=0;z<47;z++)
cout<<'*';
gotoxy(15,6);
for(z=0;z<47;z++)
cout<<'*';
for(z=0;z<4;z++)
{
gotoxy(15,3+z);
cout<<'*';
gotoxy(61,3+z);
cout<<'*';
}
gotoxy(22,4);
cout<<"Welcome to LIC's VIEW POLICY section";
gotoxy(24,9);
cout<<"Please enter your details";
gotoxy(16,12);
cout<<"Name:"<<name;
gotoxy(16,13);

cout<<"Age:"<<age;
gotoxy(16,14);
cout<<"Sex:"<<sex;
gotoxy(16,15);
cout<<"Marital status:"<<mar;
}
void deep_the_great::p_again2()
{
int z;
clrscr();
gotoxy(15,2);
for(z=0;z<47;z++)
cout<<'*';
gotoxy(15,6);
for(z=0;z<47;z++)
cout<<'*';
for(z=0;z<4;z++)
{
gotoxy(15,3+z);
cout<<'*';
gotoxy(61,3+z);
cout<<'*';
}
gotoxy(23,4);
cout<<"Welcome to LIC's PAYMENT section";
gotoxy(28,9);
cout<<"Personal details:";

gotoxy(16,12);
cout<<"Name:"<<name;
gotoxy(16,13);
cout<<"Age:"<<age;
gotoxy(16,14);
cout<<"Sex:"<<sex;
gotoxy(16,15);
cout<<"Marital status:"<<mar;
}
void deep_the_great::new_policy()
{
no_pay=0;
p_det();
p_ams();
ti();
p_again1();
gotoxy(16,16);
cout<<"Policy amount:";
gotoxy(16,17);
cout<<"(a)category:";
gotoxy(32,17);
cout<<d;
gotoxy(16,18);
cout<<"(b)Enter policy amount:";
gotoxy(16,19);
cout<<"Time period(in years):";
gotoxy(16,20);

cout<<"(a)category:";
gotoxy(16,21);
cout<<"(b)Enter time period:";
gotoxy(32,20);
cout<<e;
gotoxy(42,18);
cin>>p_am;
sound(123);
delay(50);
sound(234);
delay(50);
sound(345);
delay(50);
sound(456);
delay(50);
nosound();
gotoxy(40,21);
cin>>time;
sound(234);
delay(50);
sound(345);
delay(50);
sound(456);
delay(50);
sound(567);
delay(50);
nosound();

p_m_am=float(float(p_am)+(float)(p_am*time*10)/100);
gotoxy(18,25);
fstream f,f1;
f1.open("deep1.dat",ios::out|ios::app);
f.open("deepp.dat",ios::out|ios::binary|ios::app|ios::in);
f.seekg(0,ios::end);
ctr=f.tellg()/sizeof(deep_the_great);
c_no=ctr+1;
cout<<"Your customer no. is\t"<<c_no;
cout<<"\n\n\t\t\tPress any key...";
f.seekp(0,ios::end);
f.write((char*)&deep,sizeof(deep_the_great));
f1<<"\n\n\n\t\t\t Customer number:"<<c_no<<"\n\t\t Date of starting
policy:"<<dd<<'/'<<mm<<'/'<<yy;
f1<<"\n\n\t\t\t Personal detials \n\n Name:"<<name<<"\n Age:"<<age<<"\n
Sex:"<<sex<<"\n Marital status:"<<mar<<"\n Policy amount:"<<p_am<<"\n Maturity
amount:"<<p_m_am<<"\n Time period:"<<time;
f1.close();
f.close();
getch();
choice();
}
void deep_the_great::view_policy()
{
int flag;
int w,no;
clrscr();
int z;

gotoxy(15,2);
for(z=0;z<47;z++)
cout<<'*';
gotoxy(15,6);
for(z=0;z<47;z++)
cout<<'*';
for(z=0;z<4;z++)
{
gotoxy(15,3+z);
cout<<'*';
gotoxy(61,3+z);
cout<<'*';
}
sound(2);
delay(100);
sound(3);
delay(100);
sound(4);
delay(100);
sound(5);
delay(100);
nosound();
sound(23);
delay(100);
sound(34);
delay(100);
sound(45);

delay(100);
sound(56);
delay(100);
nosound();
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
gotoxy(22,4);
cout<<"Welcome to LIC's VIEW POLICY section";
cout<<"\n\n\n\n\t\t\tEnter customer number:";
cin>>w;
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
sound(1234);

delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
ifstream f3;
f3.open("deepp.dat",ios::in|ios::binary);
while(!f3.eof())
{
f3.read((char*)&deep1,sizeof(deep_the_great));
no=deep1.c_no;
if(no==w)
{
flag=0;
clrscr();
deep1.p_again();
gotoxy(16,16);
cout<<"Policy amount:";
gotoxy(32,16);
cout<<deep1.p_am;
gotoxy(16,18);
cout<<"Time period(in years):";
gotoxy(40,18);
cout<<deep1.time;

gotoxy(16,17);
cout<<"Maturity amount:";
gotoxy(34,17);
cout<<deep1.p_m_am;
gotoxy(16,19);
cout<<"Date of starting policy:"<<deep1.dd<<'/'<<deep1.mm<<'/'<<deep1.yy;
break;
}
else
{
flag=1;
}
}
f3.close();
if(flag==1)
cout<<"\n\n\n\n\t\t Sorry!!!Not a valid customer number\n\n";
getch();
choice();
}
void deep_the_great::choice()
{
clrscr();
sound(23);
delay(100);
sound(34);
delay(100);
sound(45);

delay(100);
sound(56);
delay(100);
nosound();
sound(234);
delay(100);
sound(345);
delay(100);
sound(456);
delay(100);
sound(567);
delay(100);
nosound();
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
gotoxy(15,7);
for(int i=0;i<16;i++)
cout<<'*';
gotoxy(31,7);
cout<<"MAIN MENU";

gotoxy(40,7);
for(int a=0;a<15;a++)
cout<<'*';
gotoxy(23,10);
cout<<"1).NEW POLICY";
gotoxy(23,11);
cout<<"2).VIEW RECORDS";
gotoxy(23,12);
cout<<"3).PAYMENTS";
gotoxy(23,13);
cout<<"4).EXIT";
gotoxy(20,15);
cout<<"Please enter choice 1,2,3 or 4:";
gotoxy(15,20);
for(int j=0;j<40;j++)
cout<<'*';
for(int w=0;w<12;w++)
{
gotoxy(15,8+w);
cout<<'*';
gotoxy(54,8+w);
cout<<'*';
}
gotoxy(52,15);
cin>>ch;
switch(ch)
{

case('2'):
view_policy();
break;
case('1'):
new_policy();
break;
case('3'):
payments();
break;
case('4'):
clrscr();
gotoxy(23,25);
exit();
break;
default:
gotoxy(20,17);
cout<<"Wrong choice!!!";
gotoxy(20,18);
cout<<"Please enter choice 1,2,3 or 4";
gotoxy(52,18);
choice();
}
}

/***********************************THE MAIN
FUNCTION************************************/

void main()
{
loading();
clrscr();
int a;
for(a=1;a<20;a++)
{
sound(a*100);
delay(100);
}
nosound();
int i,j,k,c;
c=1;
for(j=0;j<42;j++)
{
for(i=42;i>j;i--)
{
gotoxy(18+i,8);
cout<<"*";
delay(1);
}
delay(5+j);
gotoxy(18+j,8);
cout<<'*';
}

for(a=1;a<20;a++)
{
sound(a*100);
delay(100);
}
nosound();
c=1;
for(i=8;i>0;i--)
{
for(j=0;j<i;j++)
{
gotoxy(18,17-j);
cout<<'*';
gotoxy(18,18-j);
cout<<' ';
delay(10);
}
delay(50+c*3);
gotoxy(18,17-i);
cout<<'*';
c+=5;
}
for(a=1;a<20;a++)
{
sound(a*100);
delay(100);
}

nosound();
for(j=0;j<42;j++)
{
for(i=42;i>j;i--)
{
gotoxy(18+i,17);
cout<<"*";
delay(1);
}
delay(5+j);
gotoxy(18+j,17);
cout<<"*";
}
c=1;
for(a=1;a<20;a++)
{
sound(a*100);
delay(100);
}
nosound();
for(i=8;i>0;i--)
{
for(j=0;j<i;j++)
{
gotoxy(60,17-j);
cout<<"*";
gotoxy(60,18-j);

cout<<' ';
delay(10);
}
delay(50+c*3);
gotoxy(60,17-i);
cout<<"*";
c=c+5;
}
delay(350);
int y;
delay(300);
sound(234);
delay(1000);
sound(345);
delay(1000);
sound(456);
delay(1000);
sound(567);
delay(1000);
sound(678);
delay(500);
sound(234);
delay(500);
sound(345);
delay(500);
sound(456);
delay(500);

sound(567);
delay(500);
sound(678);
delay(250);
sound(234);
delay(250);
sound(345);
delay(250);
sound(456);
delay(250);
sound(567);
delay(250);
sound(678);
delay(250);
nosound();
gotoxy(31,11);
cout<<"A Program on LIC";
gotoxy(33,12);
cout<<"designed by";
gotoxy(33,14);
cout<<"Akash Verma";
gotoxy(34,16);
cout<<"Praful saraswat";
cout<<"\n\n\n\n\n\n\n\n\n\t\t\t\t\t\tPress any key...";
getch();
sound(1234);
delay(100);

sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
sound(1234);
delay(100);
sound(2345);
delay(100);
sound(3456);
delay(100);
sound(4567);
delay(100);
nosound();
clrscr();
gotoxy(23,10);
for(y=0;y<32;y++)
cout<<'*';
gotoxy(23,14);
for(y=0;y<32;y++)
cout<<'*';
for(y=0;y<3;y++)
{
gotoxy(23,11+y);
cout<<'*';

gotoxy(54,11+y);
cout<<'*';
}
gotoxy(31,12);
cout<<"LIC WELCOMES YOU\n";
delay(1500);
deep.choice();
}

You might also like