CS 150 Introduction to C++ Programming - Spring 1998 |
|---|
[ Home | Lecture Notes| WebTutor | WebTutor Site Map]
Given the following program, tell the output of each line that would appear on the standard output stream.
#include <iostream.h>
#include <iomanip.h>
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 n" << endl; cout << setw(7) << y << " is y" << endl; return 0; }