帮我看看哪错了??
\*求1到100奇数之和*\#include <stdio.h>
int main (void)
{
int i,sum;
sum=0;
for(i=1;i<=100;i++)
{
if(i%2!=0)
sum=i+sum;
}
printf("sum=%d",sum);
return 0;
}
--------------------Configuration: 1到100奇数之和 - Win32 Debug--------------------
Compiling...
1到100奇数之和.cpp
F:\c\1到100奇数之和.cpp(8) : error C2018: unknown character '0xa3'
F:\c\1到100奇数之和.cpp(8) : error C2018: unknown character '0xa1'
F:\c\1到100奇数之和.cpp(8) : error C2106: '=' : left operand must be l-value
执行 cl.exe 时出错.
1到100奇数之和.obj - 1 error(s), 0 warning(s)
------------------------------