Wednesday, 10 July 2013

Print Table in C++

#include<iostream.h>
#include<conio.h>
void main()
{
    clrscr();
    int x,y;
    cout<<"Enter any number to print that table : ";
    cin>>x;

    cout<<"\n------------------------------- \n";
    cout<<"   Multiplication Table \n";
    cout<<"------------------------------- \n";

    for( y = 1 ; y <= 10 ; y++ )
    cout<<"       "<<x<<" X "<<y<<" =  "<<x*y<<endl;
    getch();
}

No comments:

Post a Comment