北大POJ 1005 一直编译错误!

北大POJ 1005 一直编译错误!
代码如下:(在本机VS2010运行正常,交上去就编译错误:
Memory:N/A Time:N/A
Language:C++ Result:Compile Error

#include
using namespace std;
int main()
{
double PI=3.14159265;
int n;
cin>>n;
for(int i=1;i>a>>b;
double total=PI*(a*a+b*b)/2;
int year=0;
while(total > 0)
{
total-=50;
++year;
}
cout
J-W-Q 1年前 已收到1个回答 举报

xxp0829 幼苗

共回答了21个问题采纳率:95.2% 举报

你的代码中间有一些空格不被系统识别
我已经帮你转换好了
你复制我的代码就可以了
里面有个小错误,见注释
已经AC.
#include
using namespace std;
int main()
{
double PI=3.14159265;
int n;
cin>>n;
for(int i=1;i>a>>b;
double total=PI*(a*a+b*b)/2;
int year=0;
while(total > 0)
{
total-=50;
++year;
}
cout

1年前

3
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.016 s. - webmaster@yulucn.com