Tuesday 28 June 2016

Give Information And Check Premium..........

#include<stdio.h>
#include<conio.h>
void main()
{
int age;
char h,a,g;
printf("Enter Your Age ");
scanf("%d",&age);
printf("Enter m For Male, f For Female ");
scanf(" %c",&g);
printf("Enter c For City, v For Village ");
scanf(" %c",&a);
printf("Enter e For Excellent Health, p For Poor Health ");
scanf(" %c",&h);
if(age>24&&age<36&&g=='m'&&a=='c'&&h=='e')
printf("Your Premium Is Rs.4/1000 And Cannot Exceed Rs.2Lakh.");
else if(age>24&&age<36&&g=='f'&&a=='c'&&h=='e')
printf("Your Premium Is Rs.3/1000 And Cannot Exceed Rs.1Lakh.");
else if(age>24&&age<36&&g=='m'&&a=='v')
printf("Your Premium Is Rs. 6/1000 And Cannot Exceed Rs.1000.");
else
printf("You Are Not Insured.");
getch();
clrscr();
}

No comments:

Post a Comment