CHECK WHETHER DRIVER IS INSURED OR NOT

#include<stdio.h>
#include<conio.h>
void main()
{
int age;
char gender,ms;
printf("Enter Marital Status M or Un");
scanf("%c",&ms);
fflush(stdin);
printf("Enter Gender M or F");
scanf("%c",&gender);
fflush(stdin);
printf("Enter Age");
scanf("%d",&age);
 if(mg='m');
 {
 printf("Insured");
 }
 else
 {
 if(gender='m');
 }
 if (age>30);
 printf("Insured");
 }
 else
 {
 printf("Not Insured");
 }
}
 else
 {
 if(age>25);
 }
 printf("Insured");
 }
 else
 {
 printf("Not Insured");
}

0 comments: (+add yours?)

Post a Comment