Program To Insure someone
#include<stdio.h>
#include<conio.h>
void main()
{
char sex;
char m_s;
int age;
clrscr();
printf("Enter the sex(M/F)::");
scanf("%c%c",&sex,&m_s);
printf("Ented the martial status(U/M) ::");
scanf("%c",&m_s);
printf("Enter the age::");
scanf("%d",&age);
printf("\n\n\n\n\nage::%d sex::%c marital status::%c\n\n\n",age,sex,m_s);
if((m_s=='u' && age>30 && sex=='m')||(m_s=='u' && age>25 && sex=='f')||(m_s=='m' && sex=='m')||(m_s=='m' && sex=='f'))
{
printf(" Congratulation You are Insured");
}
else
{
printf("Sorry You can't Insured");
}
getch();
}
/*Enter the sex(M/F)::f
Ented the martial status(U/M) ::u
Enter the age::25
age::25 sex::f marital status::u
Sorry You can't Insured
*/
No comments:
Post a Comment