Print table program in C++

Here in this page we will print table Table in C++ actually it will be Print a large form of table you can see the Program output below,

#include<iostream.h>
#include<conio.h>

void main()
{
  clrscr();
  int first,last;

  cout<<"Enter first number: "; cin>>first;

  cout<<"Enter last number: "; cin>>last;

  int i =1;
 while(i<=10)
  {
     for(int j=f; j<=l;j++)
     {
        cout<<i*j<<"\t";
      }
    cout<<endl;
    i++;
  } 

 getch();
}

OUTPUT

OUTPUT:-
Enter first number: 5
Enter last number: 15

5	6	7	8	9	10	11	12	13	14	15 
10	12	14	16	18	20	22	24	26	28	30 
15	18	21	24	27	30	33	36	39	42	45 
20	24	28	32	36	40	44	48	52	56	60 
25	30	35	40	45	50	55	60	65	70	75 
30	36	42	48	54	60	66	72	78	84	90 
35	42	49	56	63	70	77	84	91	98	105
40	48	56	64	72	80	88	96	104	112	120
45	54	63	72	81	90	99	108	117	126	135
50	60	70	80	90	100	110	120	130	140	150

Related exercise

 

Leave a Reply

Your email address will not be published. Required fields are marked *