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.Use the following example, rewrite it but using vector instead. You needto use "vector taxPayerList;" It should have the following output. #include #include

#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 #include using namespace std; struct taxpayer { float taxRate; float income; float taxes; }; int main() { taxpayer taxpayerList[3]; cout > taxpayerList[count].income; cout > taxpayerList[count].taxRate; cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!