ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1020. Rope

why my program isn't compiled?
Posted by ruiqi 23 Sep 2007 05:29
why my program isn't compiled?


#include<iostream>
#include<cmath>
using namespace std;

const double pi=3.1415926;
double x[101],y[101];
double dist(double x,double y)
{
    return sqrt(x*x+y*y);
}
int main()
{
    int n,i; double r,s,;
    cin>>n>>r;
    for (i=1; i<=n; i++) cin>>x[i]>>y[i];
    s=0; x[n+1]=x[1]; y[n+1]=y[1];
    for (i=1; i<=n; i++) s+=dist(x[i]-x[i+1],y[i]-y[i+1]);
    printf("%.2lf\n",s+2*pi*r);
}
Re: why my program isn't compiled?
Posted by mk8 8 Jul 2009 23:07
int n,i; double r,s,; - delete "," after "s"