// Example program
#include <iostream>
using namespace std;
int main()
{
char gender,length,style,answer;
int Price,Counter=0;
do{
cout<<"Enter Your Gender(F/M):";
cin>>gender ;
cout<<"Enter Your Hair Length(S/M/L):" ;
cin>>length ;
cout<<"Enter Your Style(R/S):" ;
cin>>style ;
switch (gender){
case 'F':
if (((length=='S')&&(style=='R')))
{
Price=25;
}
else if (((length=='S')&&(style=='S')))
{
Price=35;
}
else if (((length=='M')&&(style=='R')))
{
Price=30;
}
else if (((length=='M')&&(style=='S')))
{
Price=40;
}
else if (((length=='L')&&(style=='R')))
{
Price=35;
}
else
{
Price=45;
}
cout<<"Price:RM"<<Price<<endl;
break;
case 'M':
if (((length=='S')&&(style=='R')))
{
Price=28;
}
else if (((length=='S')&&(style=='S')))
{
Price=33;
}
else if (((length=='M')&&(style=='R')))
{
Price=31;
}
else if (((length=='M')&&(style=='S')))
{
Price=36;
}
else if (((length=='L')&&(style=='R')))
{
Price=35;
}
else
{
Price=40;
}
cout<<"Price:RM"<<Price<<endl;
break;
default:
cout<<"Not valid"<<endl;;
}
cout<<"Add another customer?(Y/N):" ;
cin>>answer ;
Counter++ ;
}while(answer =='Y') ;
if(Counter==1)
goto result1;
else
Price+=Price;
goto result2;
result1:
cout<<"Total:RM"<<Price<<endl;
return 0;
result2:
cout<<"Total:RM"<<Price<<endl;
return 0;
}