I've been trying to figure out this problem for a week.
I've searched all sites for if else statements, and I can't figure out why !!!!!!!!!!!!!!!!!
What's wrong with my statements ??
Help me out !!!!!!!!!!! please.
#include<iostream>
#include<string>
using namespace std;
void main()
{
char hsg; //Highschool Graduate
char hs=0; //Highschool Student
string prince; //Pricipal
do{
cout << "\n" << "Are you in Highschool now ?(y or n) : ";
cin >> hs;
if(hs == 'y')
{
[COLOR="Red"]Problem Start from here :[/COLOR]
do{
cout << "\n" << "Do you have principal's permission ?(y or n) : ";
cin >> prince;
if(prince == 'y')
{
cout << "Then, you are able to take class.\n";
}
else if(prince == 'n')
{
cout << "Bring the permission letter from your Pricipal.\n";
}
}while(!(prince == 'y' || prince == 'n'));
[COLOR="red"]Problem Finish here :[/COLOR]
}
else if(hs == 'n')
{
cout << "\n";
cout << "Are you a Highschool Graduate ?(y or n) : ";
cin >> hsg;
}
}while(!(hs == 'y' || hs == 'n'));
}