Multiplication Table (10 x 10)

Thursday, September 12, 2013 1 Comments A+ a-

C++ program for Multiplication table (10 x 10)


Problem:
Write a multiplication table ( 10 x 10)
The following program shows a 10 x 10 multiplication table.
It uses the escape sequence for horizontal tab (\t) to properly align the table.

/*
Multiplication Table (10 * 10)
*/
#include <iostream>

using namespace std;

int main(void)
{
 int x,y;
 char waitInput;

 for(x=1; x<=10; x++)
 {
  for(y=1; y<=10; y++)
  {
   //use horizontal tab (\t) to align properly
   cout << "\t" << (x*y);
  }

  //newlines
  cout<<endl<<endl;
 }

 cin>>waitInput;
 return 0;
}

1 comments:

Write comments
Anonymous
AUTHOR
August 18, 2018 at 12:58 AM delete

I found useful article in your blog. thank you
visit
web programming tutorial
welookups.com

Reply
avatar