Hi, I'm having a problem at the else if statement. If I enter PT3 for the category, P for package and when I choose 'D' in if for the code of time, the calculation will choose 'D' in else if statement and proceed for the calculation and vice versa. Can anyone help me out?
if (codeOfCategory == 'P' || codeOfCategory == 'p')
{
cout<<"\n|-------------------------------------------------------------------------------------------------------------------------------------------------|";
cout<<"\n| Category | Type of | Code of | Type of | Code of | Code of Individual | Subject | Time | Code of | Price per |";
cout<<"\n| | Category | Category | Subject | Package | Subject | | | Time | package |";
cout<<"\n|-------------------------------------------------------------------------------------------------------------------------------------------------|";
cout<<"\n| | | | LANGUAGE | PTL | BMY | Bahasa Melayu | Weekdays | D | 90 |";
cout<<"\n| | | | | | ENG | English | Weekend | E | 70 |";
cout<<"\n| | | | | | SEJ | Sejarah | | | |";
cout<<"\n| PT3 | PACKAGE | P =======================================================================================================|";
cout<<"\n| | | | STEM | PTA | MAT | Mathematic | Weekdays | D | 80 |";
cout<<"\n| | | | | | SCI | Science | Weekend | E | 70 |";
cout<<"\n| | | | | | GEO | Geography | | | |";
cout<<"\n--------------------------------------------------------------------------------------------------------------------------------------------------|";
cout<<"\nPlease enter code of Package ( PTL-Language / PTA-STEM ) : ";
cin>>codeOfPackage;
if(strcmp(codeOfPackage,"PTL")==0 || strcmp(codeOfPackage,"ptl")==0)
{
cout<<"\nPlease enter code of time ( D-WEEKDAYS / E-WEEKEND ) : ";
cin>>codeOfTime;