#include <iostream> #include <string> #include <math.h> #include <stdio.h>using namespace std;int main () { int m,s,p; { cout <<"-If the driver is married:-\n"; cout<< "1. yes\n"; cout<< "2. no\n"; cin >> m; while (m==1) { cout <<"-You are insured-\n"; return 0; } } { cout <<"-Enter sex-:\n"; cout<< "1. male\n"; cout<< "2. female\n"; cin >> s; cout <<"-Enter your age-:\n"; cin >> p; } if ((s==1, p>39) and (s==2, p>25)) cout <<"-You are insured-\n"; else cout <<"-You are not insured-\n"; return 0; }
Comments