Question: Use the following example, rewrite it but using vector instead. You need to use vector taxPayerList; It should have the following output. #include #include using
Use the following example, rewrite it but using vector instead. You need to use "vector taxPayerList;" It should have the following output.

#include
#include
using namespace std;
struct taxPayer
{
float taxRate;
float income;
float taxes;
};
int main()
{
taxPayer taxPayerList[3];
cout
cout
cout
for (int count = 0; count
{
cout
cin >> taxPayerList[count].income;
cout
cin >> taxPayerList[count].taxRate;
cout
taxPayerList[count].taxes
= taxPayerList[count].income * taxPayerList[count].taxRate/100;
}
cout
for (int index = 0; index
{
cout
}
return 0;
}
#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
