老提醒出错
#include<stdio.h>int main()
{
int x;
int i,a,b;
int sum=0;
int d=1;
printf("INPUT\n");
scanf("%d",&x);
b=x;
if((x>0)&&(x<100000))
{
f0r (i=1;i<b;i++)
{
a=x%10;
x=x/10;
if({(a%2==0)&&(i%2==0)}||{(a%2>1)&&(i%>1)})
{
d*=2;
}
sum+=d;
i++;
}
}
printf("%d",sum);
return 0;
}
上面是源程序。下面是提醒出错的地方:
[Error] expected ')' before ';' token
Error] expected ';' before ')' token
[Error] expected '}' at end of input
expected '}' at end of input
不知道为什么会出错,求教!!