Define a function FindTaxPercent() that takes one integerparameter as the age of a person, and returns the person's taxpercent as a double. The tax percent is returned as follows: If aperson's age is more than 80 years old, tax percent is 0.08. If aperson's age is more than 20 and up to 80 years old, tax percent is0.28. Otherwise, tax percent is 0.38. Ex: If the input is 85, theoutput is: 0.08
code:
#include <iostream>using namespace std;
/* Your code goes here */
int main() { int personsAge;
cin >> personsAge;
cout << FindTaxPercent(personsAge) <<endl; return 0;}
Define a function FindTaxPercent() that takes one integer parameter as the age of a person, and returns the person's tax
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am