Here's the code. It's supposed to generate and output a 2D array but, for some reason, messes up the value for 9x10 (90) and causes the program to crash. I've attached a screenshot.
Any advice? Also, how can I make the numbers line up nicely into a neat grid?
#include <iostream>
using namespace std;
int main ()
{
int values[10][10];
for(int i=1;i<=10;i++)
{
for(int j=1;j<=10;j++)
{
values[i][j]=i*j;
cout<<\t<<values[i][j]<<flush;
}
cout<<endl;
}
return 0;
}