#include <stdio.h>
int main()
{
int age;
char marietal_status[15], sex[15];
printf("Age, Marietal status, sex of the driver : ");
scanf("%i %s %s", &age, marietal_status, sex);
if((marietal_status == married) || (marietal_status == unmarried && age > 30 && sex == male)
|| (marietal_status == unmarried && age >25 && sex == female))
printf("insured");
else
printf("uninsured");
}
ouput:
gcc /tmp/NaKWq16d9Q.c -lm
/tmp/NaKWq16d9Q.c: In function 'main':
/tmp/NaKWq16d9Q.c:10:28: error: 'married' undeclared (first use in this function)
10 | if((marietal_status == married) || (marietal_status == unmarried && age > 30 && sex == male) || (marietal_status == unmarried && age >25 && sex == female))
| ^~~~~~~
/tmp/NaKWq16d9Q.c:10:28: note: each undeclared identifier is reported only once for each function it appears in
/tmp/NaKWq16d9Q.c:10:60: error: 'unmarried' undeclared (first use in this function)
10 | if((marietal_status == married) || (marietal_status == unmarried && age > 30 && sex == male) || (marietal_status == unmarried && age >25 && sex == female))
| ^~~~~~~~~
/tmp/NaKWq16d9Q.c:10:92: error: 'male' undeclared (first use in this function)
10 | ried) || (marietal_status == unmarried && age > 30 && sex == male) || (marietal_status == unmarried && age >25 && sex == female))
| ^~~~
/tmp/NaKWq16d9Q.c:10:152: error: 'female' undeclared (first use in this function)
10 | && sex == male) || (marietal_status == unmarried && age >25 && sex == female))
| ^~~~~~