Please use codetags.
Use constants to make code reading easier.
You forgot a lot of { } pairs.
If the process for Male and Female is equal, why make a difference?
Code:
#include<iostream.h>
#include<stdio.h>
#define MALE 'M'
#define FEMALE 'F'
enum status
{
SINGLE = 1,
MARRIED
};
enum education
{
HIGHSCHOOL = 1,
COLLEGE
};
main ()
{
char gender;
int status,college,hs,cl;
cout <<" Enter your Gender : " ;
cin >> gender;
switch (gender)
{
case MALE:
cout << " Your a Male \n";
cout << " Enter ur status (press 1(single) press 2 (married): ";
cin>> status;
switch (status)
{
case SINGLE:
cout<<"Enter Education Level (press 1(highschool) press 2 (college) : ";
cin>> college;
if (college = HIGHSCHOOL)
{
cout<<"Enter Highschool level : ";
cin>> hs;
if (hs < 3)
{
cout<<"Sorry Sir but You are not qualified";
cout<<"Hallo Sir Pls contact me for more question";
}
}
break;
case MARRIED:
cout << "Enter Education Level (press 1(highschool) press 2 (college) : ";
cin >> college;
if (college == HIGSCHOOL)
{
cout << "Enter Highschool level : ";
cin >> hs;
if (hs < 3)
{
cout << "Sorry Sir but You are not qualified";
cout << "Hallo Sir Pls contact me for more question";
}
}
break;
default:
cout << "Invalid status\n";
break;
}
break;
case FEMALE:
// Same as above?
default:
cout << "Hmmm.";
break;
}
return 0;
}