move to repo.or.cz
[letusc.git] / ch2 / examples / example6.c
blob8816e641909ce9a5aeb5898e16c3153da2010729
1 #include<stdio.h>
3 int main()
6 char sex,marital;
7 int age;
9 printf("Enter age, sex, marital: ");
10 scanf("%d %c %c",&age,&sex,&marital);
12 if((marital=='m')||(marital=='u' && sex=='m' && age>30)||(marital=='u' && sex=='f' && age>25))
13 printf("you are insured !\n");
14 else
15 printf("You are not married !\n");
17 return 0;