0 answer

I need to to write C++ program that initialize structures variables, the sample output is given....

Question:

#include <iostream>
using namespace std;
// This program demonstrates partially initialized structure variables
// PLACE YOUR NAME HERE
struct taxPayer
{
char name[25];
long socialSecNum;
float taxRate;
float income;
float taxes;
};
int main()
{
#include <iomanip>
// Fill in code to initialize a structure variable named citizen1 so that
// the first three members are initialized. Assume the name is Tim
// McGuiness, the social security number is 255871234, and the tax rate is .35
// Fill in code to initialize a structure variable named citizen2 so that
// the first three members are initialized. Assume the name is John Kane,
// the social security number is 278990582, and the tax rate is .29
cout << fixed << showpoint << setprecision(2);
// calculate taxes due for citizen1
// Fill in code to prompt the user to enter this year's income for the citizen1
// Fill in code to read in this income to the appropriate structure member
// Fill in code to determine this year's taxes for citizen1
cout << "Name: " << citizen1.name << endl;
cout << "Social Security Number: " << citizen1.socialSecNum << endl;
cout << "Taxes due for this year: $" << citizen1.taxes << endl << endl;
// calculate taxes due for citizen2
// Fill in code to prompt the user to enter this year's income for citizen2
// Fill in code to read in this income to the appropriate structure member
// Fill in code to determine this year's taxes for citizen2
cout << "Name: " << citizen2.name << endl;
cout << "Social Security Number: " << citizen2.socialSecNum << endl;
cout << "Taxes due for this year: $" << citizen2.taxes << endl << endl;
return 0;
}
Sample Run:
Please input the yearly income for Tim McGuiness: 30000
Name: Tim McGuiness
Social Security Number: 255871234
Taxes due for this year: $10500.00
Please input the yearly income for John Kane: 60000
Name: John Kane
Social Security Number: 278990582
Taxes due for this year: $17400.00


Answers

Similar Solved Questions

1 answer
Can someone help me obtain the net ionic of this chemic equation? In the final reaction,...
Can someone help me obtain the net ionic of this chemic equation? In the final reaction, aluminum sulfate reacts with potassium sulfate to generate alum. The bal- anced chemical equation is given in the table below. Identify the reaction type(s) and record your observations for this step. Unbala...
1 answer
I need a code and its java Blue jay please its almost due Week 8 Quiz...
I need a code and its java Blue jay please its almost due Week 8 Quiz Submitting a file upload File Types pdf Due Friday by 11:30am Points 10 Available after Oct 25 at 10:45am With your team, write a program that inputs a 3-digit integer, like 731. Then the program should multiply the number by 1001...
1 answer
How would you compare William Jennings Bryan "Cross of Gold" speech to a political speech today?
How would you compare William Jennings Bryan "Cross of Gold" speech to a political speech today?...
1 answer
2) Sodium Chlorate sounds nothing like Vincent Price, a horror movie actor. Wha pH of a...
2) Sodium Chlorate sounds nothing like Vincent Price, a horror movie actor. Wha pH of a 0.745 M solution of sodium chlorate, Na(C10), if the Ka of HCIO is 2.90*10*º?!...
1 answer
Question 16 Child Health and Development Studies (CHDS) has been collecting data about Type numbers in the boxes. e...
Question 16 Child Health and Development Studies (CHDS) has been collecting data about Type numbers in the boxes. expectant mothers in Oakland, CA since 1959. One of the measurements taken 10 points by CHDS is the weight increase in pounds) for expectant mothers in the second trimester. In a fictiti...
1 answer
An electric field of 9.00×105 V/m is desired between two parallel plates, each of area 45.0...
An electric field of 9.00×105 V/m is desired between two parallel plates, each of area 45.0 cm2 and separated by 2.45 mm of air. What charge must be on each plate?...
1 answer
1. (10pts) Find the solution to the initial value problem for the following differential equations 1/'...
1. (10pts) Find the solution to the initial value problem for the following differential equations 1/' + 2y - 8y = (2x + 2?), y(0) = -1, 7(0) = 0....
1 answer
How to solve for b,c,d The following table contains short-run average total cost data for 5...
How to solve for b,c,d The following table contains short-run average total cost data for 5 different plant sizes for the Stiller Co. company. Output Plant 1 Plant 2 Plant 3 Plant 4 Plant 5 Complete the following questions. a) Graph the short-run average total cost curves for the plants then sketc...
1 answer
Using the company Target Describe the company’s target market. Is the company correct in their identification?...
Using the company Target Describe the company’s target market. Is the company correct in their identification? What other methods could the company use to identify targets? Note: Please include the selected company URL in your discussion post. This will allow both myself and other students to ...
1 answer
Homework: HW7 (last hw) Score: 0 of 1 pt 18 of 18 (16 complete 15.3-13 Which...
Homework: HW7 (last hw) Score: 0 of 1 pt 18 of 18 (16 complete 15.3-13 Which of the following is likely to happen if the government lowers its expenditure? O A. Price level will rise. OB. Unemployment will increase. OC. Investment will increase. OD. Consumption will increase....
1 answer
Site in octahedral holes. What propultu 4.22 Use radius-ratio rules and the ionic radii given in Resou th section...
site in octahedral holes. What propultu 4.22 Use radius-ratio rules and the ionic radii given in Resou th section 1 to predict structures of (a) U ce UO, (b) Frl, (c) Bes, (d) In metry site in octahedral holes. What propultu 4.22 Use radius-ratio rules and the ionic radii given in Resou th section ...
1 answer
2. A company is authorized to issue 800,000 shares of S6 par value common stock. Prepare...
2. A company is authorized to issue 800,000 shares of S6 par value common stock. Prepare journal entries to record the following selected transactions that occurred during the company's first year of operations: (3 Points) March. 8 Sold 110,000 shares of common stock for $9 cash per share March ...
1 answer
Problem 5 (20 pts.) In the following circuit, both switches were closed for a long time....
Problem 5 (20 pts.) In the following circuit, both switches were closed for a long time. Att = 0, the switch 1 opens and at t - 35 ms, the switch 2 also opens. hs Determine the quantities given in the following table. 1 = 0 1 = 35 ms 4 Ω 3 Ω + 2 i, 60 V X12 Ω ξ6Ω UL3150 m&...
1 answer
You are valuing Soda City Inc. It has $100 million of debt, $90 million of cash,...
You are valuing Soda City Inc. It has $100 million of debt, $90 million of cash, and 150 million shares outstanding. You estimate its cost of capital is 13.0%. You forecast that it will generate revenues of $700 million and $800 million over the next two years. Projected operating profit margin is 2...
1 answer
The marital status distribution of the U.S. male population, ages 15 and older, is as follows:...
The marital status distribution of the U.S. male population, ages 15 and older, is as follows: 31.3% never married, 56.1% married, 2.5% widowed, and 10.1% divorced/separated. A random sample of 400 U.S. young adult males, 18 to 24 years old, found 140 never married, 238 married, 2 widowed, and 20 di...
1 answer
Suppose you are offered a project with the following payments: Year Cash Flows 0 $ 9,700...
Suppose you are offered a project with the following payments: Year Cash Flows 0 $ 9,700 1. − 5,200 2. − 3,900 3. − 3,000 4. − 1,600 a. What is the IRR of this offer? (Do not round intermediate calculations. Enter your answer as a percent rounded to 2 decimal places, e.g., 32...