在int j之前预期的不合格id.我知道它可能偏离主题,但我找不到错误

expected unqualified id before int j. I know it might be off topic but i cant find the error

本文关键字:错误 找不到 int 我知道 id 不合格      更新时间:2023-10-16
#include <iostream>


using namespace std;

int main () 

{
        for (int i = 0; i < 10;i++)
{
        cout << 't' << i; // t represent a tab character, which will format our output nice;y

}
       cout << 'n';

       for( int i = 0; i < 10; ++i)

       cout << i;
}
       (int j = 0; j < 10; ++j)

       cout <<'t' << i * j;
}
       cout << 'n';
}
}

for关键字缺失,大括号中有很多错误。我建议使用适当的缩进来避免这样的错误

您在使用j时忘记了循环中的for关键字。