2012-09-27T08:00:17-04:00
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
1
2012-09-28T07:59:27-0400
#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 !
Learn more about our help with Assignments:
C++
Comments