c语言简单问题
#include<stdio.h>main()
{int n,sum,s,t;
sum=0;
n=1;
t=1;
s=1;
while (n<102)
{sun=sum+t;
n=n+2;
s=-s;
t=n*s;
}
printf("sum=%d\n",sum);
}
和
#include<stdio.h>
main()
{int y,x;
printf("input x:\n");
scanf("%d",&x);
printf("x=%d\n",x);
if(-5<x)
y=x ;
else if(x=0)
y=--x;
else if(0<x)
y=x++;
printf("y=%d\n",y);
printf("***end***\n");
}
怎么都不能运行?请大侠赐教!!!