fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void getData(char&, int&, int&, int&);
  5. int taxAmount(int);
  6.  
  7. int main()
  8. {
  9. char marital;
  10. int children;
  11. int grossSalary;
  12. int pension;
  13.  
  14. int amount;
  15.  
  16. getData(marital, children, grossSalary, pension);
  17.  
  18. cout << "The tax amount is: $" << taxAmount(amount) << endl;
  19.  
  20.  
  21. //_getch();
  22. return 0;
  23. }
  24.  
  25. void getData(char& marital, int& children, int& grossSalary, int& pension)
  26. {
  27. cout << "Enter your marital status. Enter 'm' for married. Enter 's' for";
  28. cout << " single. \n";
  29. cin >> marital;
  30. cout << endl;
  31.  
  32. cout << "Enter the number of children you have under the age of 14. \n";
  33. cin >> children;
  34. cout << endl;
  35.  
  36. cout << "Enter your gross salary. If you are married, enter the combined";
  37. cout << " income of you and your spouse.";
  38. cin >> grossSalary;
  39. cout << endl;
  40.  
  41. cout << "Enter the number of the percentage (up to 6) of your gross";
  42. cout << " income contributed to a pension fund.";
  43. cin >> pension;
  44. cout << endl;
  45. }
  46.  
  47. int taxAmount(int amount)
  48. {
  49. return 0;
  50. }
  51.  
Success #stdin #stdout 0s 3148KB
stdin
Standard input is empty
stdout
Enter your marital status. Enter 'm' for married. Enter 's' for single. 

Enter the number of children you have under the age of 14. 

Enter your gross salary. If you are married, enter the combined income of you and your spouse.
Enter the number of the percentage (up to 6) of your gross income contributed to a pension fund.
The tax amount is: $0