error: expected ';' before numeric constant|怎么解决呀


#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int i,x,y,z;
 for(int n=1000;n<10000;n++)
    {
 x = n % 10 + (n/10)10 + (n/100)%10 + (n/1000);
 i=n;
 if(i!=0){
 y=y+(i % 16);
  i=i % 16;
 }
 i=n;
 if(i!=0){
 z=z+(i % 12);
 i=i % 12;
 }
 if(x==y && y==z){
 cout << n;
 }
 }
return 0;
}

img


这里缺少符号
你可能要写x = n % 10 + (n / 10) % 10 + (n / 100) % 10 + (n / 1000);?
有帮助望采纳~