#include <iostream>
using namespace std;

int main()
{
	int papertype;
	int nA;// amount of A4 paper
	int nB;//mount of B5 paper
	float fee;
	int TnA=0;// Total amount of A4 paper
	int TnB=0;// Total amount of B5 paper
	float Tfee=0;//Total fee
	int choice = 1;
	
while(choice ==1)
{

	cout << "Please enter papertype (1 -  A4 /2 - B5):";
	cin >> papertype;
	cout << endl;
	
	if (papertype ==1)
	{
	  cout << "Please enter amount of A4 paper:";
	  cin >> nA;
	 
	  
	  if (nA<=10)
	     fee= nA*0.06;
	     
	  else 
	  {
	       if (nA<50)
              fee=nA*0.35*0.06;
		   else
			  fee=nA*0.03;
     }
     
      TnA=TnA+nA;
      cout << endl << endl;
    }
    
	else 
    {		
	   cout << "Please enter amount of B5 paper:";
	   cin >> nB;
	 
	   
	   if (nB<50)
	      fee= nB*0.05;
	   else
          fee=nB*0.03;
       TnB=TnB+nB;
	 }  
   
   cout << "====================="<< endl;
   cout << "current fee: RM " << fee ;
   cout << endl << "====================="<< endl;
   Tfee=Tfee+fee;
   cout << "Do you want to continue(1- yes 2- no):";
   cin >> choice;

}
   cout << endl << endl;
   cout << "Total amount of A4 paper:";
   cout << TnA << endl << endl;
   cout << "Total amount of B5 paper:";
   cout << TnB << endl;
   cout << "==================="<<endl;
    cout << "Total Fee: RM";
   cout << Tfee << endl << endl;
   cout << "==================="<<endl;
   
	return 0;
}
