Answer:
// Here is code in C++.
#include <bits/stdc++.h>
using namespace std;
int main()
{
// declare and initialize variables
float item_cost=26.50;
float federal_tax=0.2,state_tax=0.05;
float cust_pay=50;
// calculate change
float change=cust_pay-(item_cost*(1+federal_tax+state_tax));
cout<<"change returned to customer is:$"<<change<<endl;
return 0;
}
Explanation:
Declare and initialize item cost with 26.5, federal tax with 0.2(i.e 20%) and state tax with 0.05(i.e 5%).After that initialize customer pay with 50. Then calculate total cost of item and subtract it from cust_pay.This will be the change amount that should be returned to customer.
Output:
change returned to customer is:$16.875