Programming Code Center(PCC)
[CPP]

(PCC)::[How-to-write-CPP-Program-to-Generate-Multiplication-Table]::[cpp]

File Name : multiplication.cpp

//Example 1: Display Multiplication table up to 10
#include <iostream>
using namespace std;

int main()
{
    int n;

    cout << "Enter a positive integer: ";
    cin >> n;

    for (int i = 1; i <= 10; ++i) {
        cout << n << " * " << i << " = " << n * i << endl;
    }
    
    return 0;
}

//Example 2: Display multiplication table up to a given range
#include <iostream>
using namespace std;

int main()
{
    int n, range;

    cout << "Enter an integer: ";
    cin >> n;

    cout << "Enter range: ";
    cin >> range;
    
    for (int i = 1; i <= range; ++i) {
        cout << n << " * " << i << " = " << n * i << endl;
    }
    
    return 0;
}

Output :

multiplication.jpg