fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6.  
  7. int purchase =95;
  8. float stateTaxRate=0.04;
  9. float countryTaxRate=0.02;
  10. float stateTax=purchase*stateTaxRate;
  11. float countryTax=purchase*countryTaxRate;
  12. float totalTask= stateTax+countryTax;
  13. cout<<"the total tax is "<<totalTask;
  14. return 0;
  15. }
Success #stdin #stdout 0s 4504KB
stdin
Standard input is empty
stdout
the total tax is 5.7