//WAP PROGRAM TO INSURE THE EMPLOYEES UNDER CERTAIN CONDITIONS
#include
#include
void main()
{
int age;
char gen,m,M,u,U,f,F;
clrscr();
printf("ENTER THE AGE=");
scanf("%d",&age);
fflush(stdin);
printf("\nENTER YOUR GENDER=");
scanf("%c",&gen);
fflush(stdin);
printf("\nENTER YOUR MARRIAGE STATUS:");
scanf("%c",&m);
if(m=='M'||m=='m')
printf("\n\nCONGRATS!!!YOU ARE INSURED");
if(m=='u'||m=='U'&&age>30&&gen=='M')
printf("\n\nCONGRATS!!!YOU ARE INSURED");
if(m=='u'||m=='U'&&gen=='f'||gen=='F'&&age>25)
printf("\n\nCONGRATS!!YOU ARE INSURED");
else
printf("\n\nSORRY:-(...!WE CAN'T INSURE YOU");
getch();
}
/******OUTPUT******
ENTER THE AGE=30
ENTER YOUR GENDER=f
ENTER YOUR MARRIAGE STATUS:u
CONGRATS!!!YOU ARE INSURED
CONGRATS!!YOU ARE INSURED
*/
No comments:
Post a Comment