# Answer to Question #24388 in C++ for Nour

Question #24388

Write a function called Compute Tax that calculates the tax on an the amount passed to the function, using the tax rate passed to the function.

Expert's answer

#include<iostream>

#include<math.h>

using namespace std;

& double Compute_Tax(double a,double b){

double c;

& c=0.01*a*b;

return c;

}

int main (){

double a,b;

cout<<" Enter the amount& : ";

cin>>a;

cout<<" Enter the tax rate (in percent) : ";

cin>>b;

cout<<" Tax : "<<Compute_Tax(a,b)<<endl;

&

system("PAUSE"); &

}

#include<math.h>

using namespace std;

& double Compute_Tax(double a,double b){

double c;

& c=0.01*a*b;

return c;

}

int main (){

double a,b;

cout<<" Enter the amount& : ";

cin>>a;

cout<<" Enter the tax rate (in percent) : ";

cin>>b;

cout<<" Tax : "<<Compute_Tax(a,b)<<endl;

&

system("PAUSE"); &

}

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment