Create a program that accept the cost of postage on a letter and compute the tax according to the following scale: 50 pesos below a 5% tax added to the cost of the mail, 51 pesos above a 7% is added to the cost of the mail and plus 10 pesos service charge if the customer desires special delivery
#include <bits/stdc++.h>
using namespace std;
int main()
{
float cost_postage;
cout<<"Enter Cost of postage: ";
cin>>cost_postage;
if (cost_postage < 50)
{
cost_postage = cost_postage + (cost_postage * .05);
cout<<cost_postage;
}
else if(cost_postage > 51)
{
cost_postage = cost_postage + (cost_postage * .07) + 10;
cout<<cost_postage;
}
return 0;
}
Comments
Leave a comment