为什么会报错
aljj 2003-10-17 02:47:33 这个程序为什么报错
说未定义i变量??
#include <iostream.h>
#include <iomanip.h>
void main()
{
cout <<" *";
for(int i=1; i<=9; i++)
cout <<setw(4) <<i;
cout <<"\n-----------------------------------------\n";
for(int i=1; i<=9; i++){
cout <<setw(3) <<i;
for(int j=1; j<=9; j++)
cout <<setw(4) <<i*j;
cout <<endl;
}
}