To print a table of numbers, you can use the \t tab character to do so. - C++ Language Basics

C++ examples for Language Basics:Console

Description

To print a table of numbers, you can use the \t tab character to do so.

Demo Code

#include <iostream>
using namespace std;
int main()//www  .  ja va 2 s. c  o  m
{
   cout << "Parrots\tRams\tKings\tTitans\tChargers\n";
   cout << "3\t5\t3\t1\t0\n";
   cout << "2\t5\t1\t0\t1\n";
   cout << "2\t6\t4\t3\t0\n";
   return 0;
}

Result


Related Tutorials