64 659
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #15434 in C++ for zyrus

Question #15434
Write a C++ program that would display a multiplication table based on the inputs coming from the user.

Example:
Input no. of column and row: 5 4 Input no. of column and row: 6 3
1 2 3 4 5 1 2 3 4 5 6
2 4 6 8 10 2 4 6 8 10 12
3 6 9 12 15 3 6 9 12 15 18
4 8 12 16 20

Expert's answer
#include <iostream>




using namespace std;




void main(){

int col, row;

cout << "Enter number of column: ";

cin >> col;

cout << "Enter number of row: ";

cin >> row;

for(int i = 1; i <= row; i++){

for(int j = 1; j <= col; j++){

cout << i*j << " ";

}

cout << endl;

}

}

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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions