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)
To draw a series of variable diagrams for the given program well use the conventions of the Study Gu... 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
-
The major problem of the National Cranberry Cooperative happened in the process of the wet berries, it contains two major deficits which caused a huge bottleneck in the whole business process and...
-
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 ledger of Melmann Company includes the following accounts. Explain why each account may require adjustment. (a) Prepaid Insurance. (b) Depreciation Expense. (c) Unearned Service Revenue. (d)...
-
How can marketing and finance departments working together improve profitability?
-
ABC, wholesale, customer profitability. Villeagas Wholesalers operates at capacity and sells furniture items to tour department-store chains (customers). Mr. Villeagas commented, We apply ABC to...
-
A box is partially filled with sand. The length of the box is 8 mm. The width of the box is 17 mm. If the volume of the sand is decreasing at a rate of 562 cubic mm per minute, what is the rate, in...
-
Terminal Industries (TI) produces a product using three departments: Mixing, Processing, and Filtering. New material is added only in the Mixing Department. The following information is given for the...
-
On October 1, 2028, Philly Company purchased inventory from a German supplier for 80,000 Euros due on January 31, 2029. Simultaneously, Philly entered into a forward contract for 80,000 Euros for...
-
C. 12x + 5x = x 3 d. Answer (x =?) 2. A water balloon is catapulted into the air so that its height h, in meters, after t seconds is h-5t2 +30 + 10 a. How high is the balloon before it is catapulted?...
-
When determining if a professional structural designer has breached its duty of care, how would the courts establish the standard expected? How then would the courts determine of the individual had...
-
Julie is HIM director at Southwest Hospital. She is served with a subpoena duces tecum, directing her to appear at the law offices of Frank Powers, Attorney at Law, for a deposition that will take...
-
Mr. Smith, vice president for operations of HMC Inc., a manufacturer of computer compenents, is constrained from meeting the five year forecast by limited capacity at the existing two plants. These...
-
1. Write a program using a main() function to generate the following output: It adds up numbers until you enter a negative number. Output: Enter a positive number (negative to quit): 12 Total = 12.00...
-
E1-9 (Algo) Inferring Values Using the Income Statement and Balance Sheet Equations LO1-1 Compute the two missing amounts for each case. Assume it is the end of the first full year of operations for...
-
Pearson Education, a publisher of college textbooks, would like to know if students prefer traditional textbooks or digital textbooks. A random sample of students was asked their preference and the...
-
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 kinds of foreign exchange risk would a U.S. company face that is exporting goods to Mexico? What kinds of things would you monitor to determine what will happen to the value of the Mexican peso?
-
Extract the annual report of a Fortune Global 500 company from a country different from your home country; use the site www.glgc.com/g600.html, or...
-
Plan a study term abroad. What would you want to learn and why? How would this change if you were a business?
Study smarter with the SolutionInn App