For example I have the following code (see below). But the output isn't correct. The output was correct a week ago when I finished it but now its out putting things like 1 * 2 is 747808. This problem is spilling over to all of my other programs.
How can I fix this?
[code]
#include <iostream>
using namespace std;
int main()
{
int i = 0;
int j = 0;
int array[8][8];
for ( int i = 0; i < 8; i++ )
{
for ( int j = 0; i < 8; i++)
{
array[j] = i * j;
}
}
cout << "multiplication table:\n";
for ( int i = 0; i < 8; i++ )
{
for ( int j = 0; j < 8; j++ )
{
cout << " [ " << i <<" ][ " << j << " ] = ";
cout << array[ i ][ j ] << " ";
cout << "\n";
}
}
}
[\code]