How TO's' Training materials, Videos, I.T research materials and more other educative and informative project.....CEO Mentorship.


Monday, October 19, 2015

How To Create Multiplication Table Using C++


#include <iostream>
#define WIDTH 10
#define HEIGHT 12
using namespace std;
int G[HEIGHT * WIDTH];
int n,m;
int main()
{
cout<<"1x"<<"\t"<<"2x"<<"\t"<<"3x"<<"\t"<<"4x"<<"\t"<<"5x"<<"\t"<<"6x"<<"\t"<<"7x"<<"\t"<<"8x"<<"\t"<<"9x"<<"\t"<<"10x"<<"\n";
    for(n=0;n<HEIGHT;n++)
    for(m=0;m<WIDTH;m++)
    {
    G[n*WIDTH+m]=(n+1)*(m+1);
    cout<<G[n*WIDTH+m]<<"\t";
    }
system("pause");
return 0;
}

Related Posts:

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.