Calling function
I wanna call the function calculate to do the math then i wanna take the variables from the function calculate to put it in. The function print bill and print it ...help ! ââââââ calculate function float calculate ( char pc , int bw ) { float amount ; switch (pc) { case 'F': { if(bw<=30) { amount=0.0; } else if (bw>30) { amount=bw-30; amount=amount*10; if (bw>=50) amount=amount*0.05; } break; } case 'B': { if(bw<=25) { amount=0.0; } else if (bw>25) { amount=bw-25; amount=amount*10; } break; } case 'E': { if(bw<=20) { amount=0.0; } else if (bw>20) { amount=bw-20; amount=amount*10; } break; } } return amount ; } /////PrintBill function void printbill(string mm , char pc , float amount ) { cout<<"*********AIRLINE******\n"; cout<<"MemberShip Number:"<<mm<<"\n"; if (pc=='f'||pc=='F') { cout<<"Class"<<"First/n"; } if (pc=='e'||pc=='E') { cout<<"Class"<<"Economy/n"; } if (pc=='b'||pc=='B') { cout<<"Class"<<"bussniess/n"; } cout<<"Total Charge"<<fixed<<setprecision(2)<<amount<<"SR\n"; cout<<"*****************************"; }