b) What will be printed after executing the following C++ code? Show the exact output. double...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
b) What will be printed after executing the following C++ code? Show the exact output. double x-21.79, y=84.376, w= -58.469; cout <<"X=" << setfill('!') <<setw (8) << x <<'\n'; cout << fixed <<setprecision (2) <<setfill('#'); cout <<"Y=" <<setw (9) <<y <<setprecision (2) <<'\n'; cout << "W="<< setfill('*') <<setw (10) << w<<endl; cout<< "AW " << left <<setw (8) << w << endl; OUTPUT: b) What will be printed after executing the following C++ code? Show the exact output. double x-21.79, y=84.376, w= -58.469; cout <<"X=" << setfill('!') <<setw (8) << x <<'\n'; cout << fixed <<setprecision (2) <<setfill('#'); cout <<"Y=" <<setw (9) <<y <<setprecision (2) <<'\n'; cout << "W="<< setfill('*') <<setw (10) << w<<endl; cout<< "AW " << left <<setw (8) << w << endl; OUTPUT:
Expert Answer:
Answer rating: 100% (QA)
The C code shown in the image is using the iomanip library functions to format the output of the variables x y and w Lets go through each line of the ... View the full answer
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date:
Students also viewed these programming questions
-
40) What will be printed after executing the following C code fragment: // 2 pts #include void test2(int *a, int b); int main(void) { int a = 10, b = 6; test2 (&b a); printf("%d %d ", a, b); return...
-
Which of the tenets in Howard Gardner's (Harvard) recommendations regarding "How Education Changes" describes what students need to learn in a globalized world related to the need for students to be...
-
The following information pertains to JAE Corporation at January 1, Year 1: Common stock, $11 par, 12,000 shares authorized, 2,400 shares issued and outstanding Paid-in capital in excess of par,...
-
Host A has a file of 49.5Kbytes to send to host C and host B has a file of 70.5Kbytes to send to host D, both using TCP. TCP connection 1 from A to C and TCP connection 2 from B to D share one...
-
An air-conditioning system transfers 100 kJ/s of heat from the condenser. How much horsepower must the compressor supply if the COP is a) 8, b) 6, c) 4?
-
Use the Kruskal-Wallis test and a = .01 to determine whether the four groups come from differentpopulations. Group Group 2 Group 3Group 4 13 10 12 10 2 10
-
Refer to the decision faced by Jessicas parents in Disney World. Which criteria of relevance did the $56 baby-sitting cost fail to meet? Explain your reasoning.
-
The following transactions relate to the General Fund of the City of Buffalo Falls for the year ended December 31, 2012: 1. Beginning balances were: Cash, $150,000; Taxes Receivable, $200,000;...
-
Answer the following items. Show your solutions in paper. 1. If 25,000 is deposited annually starting on January 1, 2021 and it earns 9%, how much will accumulate by December 31, 2030? 2. How much...
-
Adriaan Taylor Corporation is a newly formed entity that engages in the purchase and resale of amphibious tour vehicles. Purchases for the first year of operation were as follows: Date Purchases...
-
Suppose the array passed to the search methods only has relevant entries in the first size entries. How would you change the iterative and recursive search methods to accommodate this more restricted...
-
A square loop of wire has a perimeter of \(60 \mathrm{~cm}\) and is oriented such that two of its parallel sides form a \(30^{\circ}\) angle with the horizontal. A uniform horizontal magnetic field...
-
Why does the existence of asymmetric information mean that economic decisions do not conform to the assumptions of the standard economic model?
-
In one time period, the growth rate of GDP of a country is recorded as 3.4 per cent against a trend growth rate of output of 2.8 per cent. In the next two time periods, the growth rate of GDP is...
-
Explain, using examples, the difference between a principal and an agent.
-
Poverty is described as a relative concept what does this mean?
-
Monsanto sells genetically modified seed to farmers. It needs to decide how much seed to put into a warehouse to serve demand for the next growing season. It will make one quantity decision. it costs...
-
Starr Co. had sales revenue of $540,000 in 2014. Other items recorded during the year were: Cost of goods sold ..................................................... $330,000 Salaries and wages...
-
Our linked-list class allowed insertions and deletions at only the front and the back of the linked list. These capabilities were convenient for us when we used composition to produce a stack class...
-
Demonstrate that the parentheses around the argument number1 + number2 in the following statement are unnecessary: System.out.printf("Sum is %d%n", (number1 + number2))
-
Write an application that encodes English-language phrases into pig Latin. Pig Latin is a form of coded language. There are many different ways to form pig Latin phrases. For simplicity, use the...
-
2. YOU BE THE JUDGE WRITING PROBLEM Jerome Schneider wrote several books on how to avoid taxes. These books were sold on Amazon.com. Amazon permits visitors to post comments about items for sale....
-
1. ETHICS Matt Drudge published a report on his Web site (http://www.drudgereport .com) that White House aide Sidney Blumenthal "has a spousal abuse past that has been effectively covered up.......
-
3. During the course of 10 months, Joseph Melle sent more than 60 million unsolicited e-mail advertisements to AOL members. What charges could be brought against him?
Study smarter with the SolutionInn App