Generates table with cout and setw - C++ Language Basics

C++ examples for Language Basics:Console

Description

Generates table with cout and setw

Demo Code

#include <iostream>
#include <iomanip>
using namespace std;
int main()//from   w  w  w.ja  v a 2 s. co  m
{
   cout << 1990 << setw(8) << 135 << endl
   << 1991 << setw(8) << 7290 << endl
   << 1992 << setw(8) << 11300 << endl
   << 1993 << setw(8) << 16200 << endl;
   return 0;
}

Result


Related Tutorials