7. Show precisely the output of the following C++ program. Use a to indicate each blank.
#include <iostream.h>
#include <iomanip.h> // For setw()
int main()
{
char ch;
int n;
float y;
ch = 'A';
cout < ch;
ch = 'B';
cout < ch < endl;
n = 413;
y = 21.8;
cout < setw(5) < n < is the value of n < endl;
cout < setw(7) < y < is the value of y < endl;
return 0;
}
8. Given that x is a float variable and x = 14.3827, show the output of each statement below. Use a to indicate each blank.
a. cout < x is < setw(5) < setprecision(2) < x;
b. cout < x is < setw(8) < setprecision(2) < x;
c. cout < x is < setw(0) < setprecision(2) < x;
d. cout < x is < setw(7) < setprecision(3) < x;
9. Show precisely what is output by the following statement.
cout < A rolling < endl
< stone < endl < endl
< gathers < endl
< endl < endl < endl < no
< moss < endl;