do
{
cout<<"\n========================================================================";
cout<<"\n\n Welcome to i-Excellent Tuition Academy "<<endl;
cout<<"\n========================================================================";
cout<<"\nThis is a registration form." <<endl;
cout<<"\nPlease enter your full name : " ;
cin>>ws;
cin.getline(studentName,50);
cout<<"\nPlease enter your school name : ";
cin.getline(schoolName,30);
cout<<"\nPlease enter your contact number : ";
cin>>contactNumber;
cout<<"\nPlease enter category ( PT3 / SPM ) : ";
cin>>category;
the continuaition of program is on the comment section
cout<<"\nDo you want to add Individual Subject? : ";
cin>>addOn;
cout<<setprecision(2)<<fixed;
if (addOn == 'Y')
{
for (int PT3Sub =0; PT3Sub <4; PT3Sub++)
{
cout<<"\n|-------------------------------------------------------------------------------------|";
cout<<"\n| Category | Code of Individual | Subject | Time | Code of | Price per |";
cout<<"\n| | Subject | | | Time | subject |";
cout<<"\n|-------------------------------------------------------------------------------------|";
cout<<"\n| | BMY | Bahasa Melayu | | | 35 |";
cout<<"\n| |--------------------|-----------------| | |-----------|";
cout<<"\n| | ENG | English | | | 35 |";
cout<<"\n| |--------------------|-----------------| | |-----------|";
cout<<"\n| | SEJ | Sejarah | Weekdays | D | 35 |";
cout<<"\n| |--------------------|-----------------| | |-----------|";
cout<<"\n| PT3 | MAT | Mathematics | Weekend | E | 30 |";
cout<<"\n| |--------------------|-----------------| | |-----------|";
cout<<"\n| | SCI | Science | | | 30 |";
cout<<"\n| |--------------------|-----------------| | |-----------|";
cout<<"\n| | GEO | Geography | | | 30 |";
cout<<"\n--------------------------------------------------------------------------------------|";
cout<<"\nHow many subject do you want to register (MAXIMUM - 4 SUBJECTS)? : ";
cin>>PT3Sub;
while (PT3Sub<0 || PT3Sub>4)
{
cout<<"ERROR!!";
cout<<"\nHow many subject do you want to register (MAXIMUM - 4 SUBJECTS)? : "; //over limit please choose until 4 subject
cin>>PT3Sub; //cin>>countI;
}
while(count<= PT3Sub)
{
cout<<"\n\nPlease enter code of Individual Subject : ";
cin>>codeOfIndividualSub;
else if (codeOfCategory == 'I' || codeOfCategory == 'i')
{
cout<<"\n|--------------------------------------------------------------------------------------------------------------------|";
cout<<"\n| Category | Type of | Code of | Code of Individual | Subject | Time | Code of | Price per |";
cout<<"\n| | Category | Category | Subject | | | Time | subject |";
cout<<"\n|--------------------------------------------------------------------------------------------------------------------|";
cout<<"\n| | | | BMY | Bahasa Melayu | | | 35 |";
cout<<"\n| | | |--------------------|-----------------| | |-----------|";
cout<<"\n| | | | ENG | English | | | 35 |";
cout<<"\n| | | |--------------------|-----------------| | |-----------|";
cout<<"\n| | | | SEJ | Sejarah | Weekdays | D | 35 |";
cout<<"\n| | | |--------------------|-----------------| | |-----------|";
cout<<"\n| PT3 | INDIVIDUAL | I | MAT | Mathematics | Weekend | E | 30 |";
cout<<"\n| | | |--------------------|-----------------| | |-----------|";
cout<<"\n| | | | SCI | Science | | | 30 |";
cout<<"\n| | | |--------------------|-----------------| | |-----------|";
cout<<"\n| | | | GEO | Geography | | | 30 |";
cout<<"\n---------------------------------------------------------------------------------------------------------------------|";
cout<<"\nPlease enter code Of Time (D-WEEKDAYS / E-WEEKEND) : ";
cin>>codeOfTime;
cout<<"\nHow many subject do you want to register (MAXIMUM - 4 SUBJECTS)? : ";
cin>>PT3Sub;
while (PT3Sub<0 || PT3Sub>4)
{
cout<<"ERROR!!";
cout<<"\nHow many subject do you want to register (MAXIMUM - 4 SUBJECTS)? : "; //over limit please choose until 4 subject
cin>>PT3Sub; //cin>>countI;
}
while(count<= PT3Sub)
{
cout<<"\n\nPlease enter code of Individual Subject : ";
cin>>codeOfIndividualSub;