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.
1
Expert's answer
2012-10-05T08:13:53-0400
#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;


}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS