Monday, August 22

Multiplication Table


#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    long Length,Width,x,y;
    cout<<"\nEnter Length(Horizontal Range_Columns): ";
    cin>>Length;
    cout<<"\nEnter Width(Vertical Range_Rows):       ";
    cin>>Width;
    cout<<"\nTable of Multiplication:\n\n";
    for(x=1;x<=Width;x++){
                          for(y=1;y<=Length;y++){
                                                 cout<<x*y<<" ";
                                                 }
                                                 cout<<"\n";
                                                 }
    cout<<"\n\n\n";
/*Note: Table is not well organized, specially when dealing with great numbers.*/                        
    system("PAUSE");
    return EXIT_SUCCESS;
}

/*Program Preview*/


No comments:

Post a Comment