# Answer to Question #15915 in C++ for Philip Alegria

Question #15915

Make and run a program that will let the user to input two numbers. Display a multiplication table using entered numbers as its size. Set maximum size to 20.

Expert's answer

#include <iostream>

using namespace std;

int main (){

int n,m;

cout<<"Enter two number\n";

cin>>n>>m;

if (n > 20 || m > 20) cout<< "Input uncorrect!\n";

else

for (int i = 0 ; i < n ; i++){

& for (int j = 0 ; j < m ; j++)

& {

& cout<< i+1<<"*" << j+1 << "="<< (i+1)*(j+1)<<" quot;;

& }

& cout<<endl;

}

system("pause");

return 0;

}

using namespace std;

int main (){

int n,m;

cout<<"Enter two number\n";

cin>>n>>m;

if (n > 20 || m > 20) cout<< "Input uncorrect!\n";

else

for (int i = 0 ; i < n ; i++){

& for (int j = 0 ; j < m ; j++)

& {

& cout<< i+1<<"*" << j+1 << "="<< (i+1)*(j+1)<<" quot;;

& }

& cout<<endl;

}

system("pause");

return 0;

}

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment