Define a function FindTaxPercent() that takes one integer parameter as the age of a person, and returns the person's tax

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Define a function FindTaxPercent() that takes one integer parameter as the age of a person, and returns the person's tax

Post by answerhappygod »

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;}
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply