19 March, 2012

C++ Program To Print Multiplication Tables.

This Post Contains A C++ Program To Print Multiplication Tables With Correct Source Code & Output. This Program Is Written, Compiled & Executed At TurboC3.0 Compiler & Will Help You To Understand The Concept Of 'For-loop' & 'Nested Loops' From C++ Language. It Is A Well-Structured Program With Proper Comments Which Provides Step-By-Step Description Of Various Features Of The Language In A Simple & Easy-To-Understand Way.
 


 # Note : You Can Simply Copy-Paste The Following Program Or Code Into Compiler For Direct Result.


C++ Program To Print Multiplication Tables.

/* Declaration Of Header Files */
# include <iostream.h>
# include <conio.h>

/* Start Of Main Program */
void main()
{
   /* Declaration Of Variables */
   int i,  j;
   clrscr();
 
    /* Source Code For Computing Multiplication Tables */
    for ( i = 1; i <= 10; i++ )
   {
      for ( j = 1; j <= 10; j++ )
     {
             cout << "\n " << i << " * " << j << " = " << i * j;
      }
      cout << " \n ";
      getch();
   }
}
/* End Of Main Program */ 

------------------------------------------------------------------------------------------------------------


Main Program Written In IDE
 ------------------------------------------------------------------------------------------------------------


Alt + F9 : Compiling The Program
 ------------------------------------------------------------------------------------------------------------


Ctrl + F9 : Output Of The Above Program





No comments:

Post a Comment

Subscribe To:

Most Commonly Asked Programs In 'C' & 'C++' Language.