fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int profit;
  6. cout << "Enter the amount of profit:\n";
  7. cin >> profit;
  8. double tax = (double) profit * 0.17;
  9. cout << "The tax owing is equal to " << tax;
  10. return 0;
  11. }
Success #stdin #stdout 0.01s 5276KB
stdin
21
stdout
Enter the amount of profit:
The tax owing is equal to 3.57