There are three calls to member functions of ostream object cout that set the format of stream output so that the format of the output is in fixed point, a decimal point always shows, and there are two places of decimals after the decimal point. Give these statements along with the necessary #include and using statements.
What will be an ideal response?
```
#include
using std::ios;
//. . .
cout.setf(ios::fixed); //fixed format output
cout.setf(ios::showpoint);//display decimal point
cout.precision(2); //display 2 places of decimals
```
The first call to setf sets the stream state floating point output to fixed, the second makes sure the decimal point shows. The third, with these io flags set to these values, will set the number of decimal places to the right of the decimal to 2.
You might also like to view...
Which of the following is an example of spreadsheet software?
A. Microsoft Excel B. Microsoft InfoPath C. Microsoft Access D. Microsoft OneNote
WYSIWYG stands for ________
Fill in the blank(s) with correct word
Managing user accounts and the permissions to resources is very complex and difficult, requiring that an administrator use _______________ to stay on top of all the subtleties and protect the network.
Fill in the blank(s) with the appropriate word(s).
?_____, a principle of design, is the repetition or alternation of a design element in order to provide a sense of movement, flow, and progress.
A. ?Unity B. ?Balance C. ?Rhythm D. ?Emphasis