Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
313 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main() {
	int a, b, c;
	cin >> b >> a;
	cout << "  ";
	for (int i = 1; i < b+1; i++){
		cout << i << ' ';
	}
	cout << endl;
	for (int i = 1; i < a+1; i++){
		cout << i;
		for (int j = 1; j < b+1; j++){
			cout << ' ' << j * i;
		}
		cout << endl;
	}
}