multiplication table c++ for loop
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main()
{
cout << " X";
for (int q = 1 ; q<=10 ; q++)
{
cout << setw(4) << q ;
}
cout<< "\n";
for (int i = 1 ; i<=10 ; i++)
{
cout << setw(2) << i;
for (int j = 1; j<= 10 ; j++)
{
cout << setw(4) << j*i;
}
cout << "\n";
}
}