Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- //program that computes a multiplication table, basic formatting or
- int main() {
- int x,y;
- int result = 0;
- cout<< "Enter a number to multiply: ";
- cin >> x;
- cout << "Enter another number to multiply: ";
- cin >> y;
- for(int i=1; i<=x; i++) {
- cout << setw(5) << i;
- for(int j=1; j<=y; j++) {
- cout << setw(5)<< i*j;
- }
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement