此源程序错在什么地方
#include<iostream>void main()
{
int i(1),sum(0);
while(i<=10)
(
sum+=i;
i++;
)
cout<<"sum="<<sum<<endl;
}
下面是编绎出错信息
------------Configuration: Cpp3 - Win32 Debug--------------------
Compiling...
Cpp3.cpp
f:\vcycx\cpp3.cpp(7) : error C2143: syntax error : missing ')' before ';'
f:\vcycx\cpp3.cpp(9) : error C2059: syntax error : ')'
f:\vcycx\cpp3.cpp(10) : error C2065: 'cout' : undeclared identifier
f:\vcycx\cpp3.cpp(10) : error C2297: '<<' : illegal, right operand has type 'char [5]'
f:\vcycx\cpp3.cpp(10) : error C2065: 'endl' : undeclared identifier
执行 cl.exe 时出错.
Cpp3.exe - 1 error(s), 0 warning(s)