Thursday, 19 July 2018

Insurance Policy calculator

===========================================================================
                                CODING



#include<iostream.h>
#include<conio.h>
#include<math.h>

void main()
{
clrscr();
char n[20];
int a,b,g,h;
cout<<"\n Enter your name: ";
cin>>n;
cout<<"\n Enter your age: ";
cin>>a;
cout<<"\n Where do you live?(1-City & 2-Village): ";
cin>>b;
cout<<"\n Enter your Gender(1-Male & 2-Female): ";
cin>>g;
cout<<"\n Are you healthy?(1-Yes & 2-No): ";
cin>>h;
if(a>=25 && a<=35 && b==1 && g==1 && h==1)
{cout<<n<<"\n You have to pay Rs.4 per thousand and your policy amount cannot exceed Rs.2 lakhs";}
else if(a>=25 && a<=35 && b==1 && g==2 && h==1)
{cout<<n<<"\n You have to pay Rs.3 per thousand and your policy amount cannot exceed Rs.1 lakhs";}
else if(a>=25 && a<=35 && b==2 && g==1 && h==2)
{cout<<n<<"\n You have to pay Rs.6 per thousand and your policy amount cannot exceed Rs.10000";}
else
{cout<<"\n You are not eligible for insaurance";}
getch();
}

===========================================================================


                                OUTPUT


No comments:

Post a Comment