Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. /*
  2. */
  3. #include<iostream>
  4. #include<cmath>
  5. #include<iomanip>
  6. #include<string>
  7. using namespace std;
  8.  
  9.  
  10. int main()
  11. {
  12.  
  13. // Declare variables
  14. string month, year;
  15. double t, s, c, state, totax;
  16. // Get information
  17. cout << "Monthly Sales Tax\n\n";
  18. cout << "Please Enter Month\n";
  19. cin >> month;
  20. cout << "Please Enter Year\n";
  21. cin >> year;
  22. cout << "Please Enter Total Amount From Register\n";
  23. cin >> t;
  24. // calculate
  25. s = (t / 1.06);
  26. totax = (t - s);
  27. c = (s * 0.02);
  28. state = (s * 0.04);
  29.  
  30.  
  31. //results
  32.  
  33. cout << "Month: " << month << " / Year: "<< year <<endl;
  34. cout << setprecision(2) << fixed;
  35. cout << "--------------------\n\n";
  36. cout << "Total Collected: $" << t << endl;
  37. cout << "Sales: $" << s << endl;
  38. cout << "County Sales Tax: $" << c << endl;
  39. cout << "State Sales Tax: $" << state << endl;
  40. cout << "Total Sales Tax: $" << totax << endl;
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement