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...
-
Refer to the information provided in P10-2A. P10-2A Donnie Hilfiger has two classes of stock authorized: $1 par preferred and $0.01 par value common. As of the beginning of 2012, 200 shares of...
-
Write a program that animates the bean machine introduced in Programming Exercise 7.37. The animation terminates after 10 balls are dropped, as shown in Figures 15.38b and c. Data from Programming...
-
The trial balance for BFF Systems, Inc., at March 15, 2010, follows: During the remainder of March, BFF Systems, Inc., completed the following transactions: Requirements 1. Journalize the...
-
On November, 1 of the current year, Rob Elliot invested $30,500.00 of his cash to form a corporation, GGE Enterprises Inc, in exchange for shares of common stock. No other common stock was issued...
-
1. 5 points | Statistics of sample mean Suppose a simple random sample of size n=100 from a distribution with mean 20, variance 16. What is the sample mean's variance and standard deviation?
-
Retro Productions Ltd. is a Vancouver-based furniture manufacturer. The company reported the following information on its trial balance for 11 months of the year ended November 30, 2018. Retro...
-
Annual pay for Walmarts top 6 executives totalled $80m including 22m for the CEO, while Walmart workers in Bangladesh work 11-14 hours a day, 7 days a week, for $37 a month ($444 per year). Analyse...
-
For our upcoming executive retreat, the Strategy Group has been tasked with competing a strategic analysis of our business and our industry. While there are a number of different approaches that we...
-
Choose a microeconomic topic. Discuss contemporary topic about Problems of Public Housing, the goal, and the following outlines in the introduction. Identify what others have to say on the chosen...
-
Tiffany, who has no wealth, has a von Neumann Morgenstern utility function that is equal to u(c)=c 1/2 , where c is her terminal wealth. She has to choose between two job offers, each of which has a...
-
1. Many people say that organizational behavior (OB) is the "soft" part of business, implying that it's an easy subject and not as hard as the technical and statistical analysis of finance and...
-
Rather than use the hypothetical information above, determine from available news sources if the Fed is increasing, holding steady, or decreasing interest rates. Similarly, is the Federal Government...
-
WHAT GOVERNANCE BY LAW ENTAILS, FROM THE POINT OF RULE OF LAW:
-
How will relating product contribution margin s to the amount of the constrained resource they consume help a company maximize its profits?
-
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...
-
Are revisions of periodic depreciation made to previous periods? Explain.
-
Why is depreciation an allocation concept rather than a valuation concept?
-
What is the formula for calculating annual depreciation under the straight-line method?
Study smarter with the SolutionInn App