Draw a series of variable diagrams for the program below using the conventions of the Study...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Draw a series of variable diagrams for the program below using the conventions of the Study Guide. Assume that the following input is given: 2010 t 1 #include 2 #include 3 using namespace std; 4 int main () 5 8 9 ( 6 7 10 11 12 13. 14 15 16 17 in bi 7890HN N N N N N N N N NTTE 18 19 20 21 22 23 24 25 26 27 28 29 30 ww 31 int year; char code; bool book = true; float discount = 0.20; 35 36 } cin >> year >> code; switch (year) ( true; 32 33 34 case 2008: case 2009: if (code == 'c') if (!book) case 2010: break; if (book) discount += 0.20; case 2011: if else return 0; if (code == 't') { default: book= false; code = 'g'; (discount > 0.20 11 code == discount = 0.15; discount += 0.10; discount = 0.25; code = 'b'; book = 'g') } discount = 0.35; cout < < year < < " " < < code < < "" < < book < < " " < < discount < < endl; Draw a series of variable diagrams for the program below using the conventions of the Study Guide. Assume that the following input is given: 2010 t 1 #include 2 #include 3 using namespace std; 4 int main () 5 8 9 ( 6 7 10 11 12 13. 14 15 16 17 in bi 7890HN N N N N N N N N NTTE 18 19 20 21 22 23 24 25 26 27 28 29 30 ww 31 int year; char code; bool book = true; float discount = 0.20; 35 36 } cin >> year >> code; switch (year) ( true; 32 33 34 case 2008: case 2009: if (code == 'c') if (!book) case 2010: break; if (book) discount += 0.20; case 2011: if else return 0; if (code == 't') { default: book= false; code = 'g'; (discount > 0.20 11 code == discount = 0.15; discount += 0.10; discount = 0.25; code = 'b'; book = 'g') } discount = 0.35; cout < < year < < " " < < code < < "" < < book < < " " < < discount < < endl;
Expert Answer:
Answer rating: 100% (QA)
Im sorry but I am unable to create images such as variable diagrams However I can explain to you how to interpret the given code and what a variable d... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
If the focal length of a lens is 3 centimeters and the image distance is 5 centimeters from the lens, what is the distance from the object to the lens?
-
It is initially at 25\deg C. The warehouse is desired to be cooled to 5\deg C. The heat transferred from the external environment to the tank is 1.2 kW. Accordingly, a cooling system with H kW power...
-
Q4 11 Points 4. Consider the following Current Data for ABC Corp.: Debt Equity Market Value (in millions of $) 16,000 26,000 Cost 7% 14% If ABC moves to and maintains a debt-to-value (D/V) ratio of...
-
The length of a shadow of a tree is 125feet when the angle of elevation of the sun is 33. Approximate the height of the tree.
-
The owner of Neros company has hired you to analyze her company's performance and financial position, as well as the positions of Iits competitors, Centar and Xermix. However, the data Neros abtained...
-
Explain double materiality. Do you think stakeholders are interested in the impact of climate-related risks on the firm or the impact of the firm on climate? Which stakeholders would they be? If you...
-
Merando Corporation was formed on January 1, 2014. At December 31, 2014, Bill Jensen, the president and sole stockholder, decided to prepare a balance sheet, which appeared as follows. Bill willingly...
-
For this exercise, instead of using the values in the challenge, ask the user for the number of shares, the share price, and the percent commission.For this exercise, instead of using the values in...
-
6. Write an SQL script that does the following and save this script as CIS276DA_FinalExercise6_MEID.sql . Save the output of this script as CIS276DA_FinalExercise6_MEID.csv Your results should...
-
What are the essential requirements of contributory copyright infringement? How did the court determine that Napster had committed this infringement?
-
according to kenneth lusht What units of comparison are commonly used for estimating the rent kinds of properties?
-
J&B Trucking Co. has net book value of $10,000 left for equipment. None of this equipment was purchased during the year. The equipment is amortized using declining balance at a rate of 20% per year....
-
David is driving at 24 m/s during a storm when he suddenly notices cars 52.3 m ahead fully stopped due to lane closures. What is the minimum coefficient of kinetic friction needed to avoid an...
-
Nyeleti is a recently admitted Attorney of the High Court of South Africa. She has been working as a Senior Associate (Legal) for a successful company called La Loca Vaca for the past 10 years....
-
In financial analysis, a company compares its financial performance in three contexts: Intracompany, a comparison of a measurement or financial relationship within a company. Industry, a comparison...
-
From the following particulars find out the value of closing stock when materials are issued under Simple Average Method: 2007 Jan. 39 : : : " 1 5 10 15 20 Balance Received Issues Issues Received...
-
Quality Chicken grows and processes chickens. Each chicken is disassembled into five main parts. Information pertaining to production in July 2012 is: Joint cost of production in July 2012 was $50. A...
-
Frank, age 35, and Joyce, age 34, are married and file a joint income tax return for 2012. Their salaries for the year total $83,000 and they have taxable interest income of $4,000. They have no...
-
Jerry made the following contributions during 2012: His synagogue (by check).....................................................$680 The Democratic Party (by check)...
-
In 2012, Lou has a salary of $54,000 from her job. She also has interest income of $1,700. Lou is single and has no dependents. During the year, Lou sold silver coins held as an investment for a...
-
What are common psychological, physical, and behavioral reactions associated with speech anxiety?
-
How can speakers use anxiety to their advantage?
-
What are some ways you can get comfortable with your audience?
Study smarter with the SolutionInn App