I need to create a multiplication table with a matrix in such a way that it looks like this:
But I can not make the table of 0 appear, this is my progress:
#include <iostream>
using namespace std;
main()
{
short A[12][12],f,c;
for(c=0;c<11;c++)
{
A[0][c]=c;
}
for(f=1;f<11;f++)
{
A[f][0]=f;
}
for(c=1;c<11;c++)
{
for(f=1;f<11;f++)
{
A[f][c]=A[f][0]*A[0][c];
}
}
for(f=0;f<11;f++)
{
for(c=0;c<11;c++)
{
cout<<A[f][c]<<" ";
}
cout<<endl<<endl;
}
system("pause");
return 0;
}
Could you code it please?
Thank you.