Witam robię zadanie ze spoja: http://pl.spoj.com/problems/ETI06F1/
W moim rozwiązaniu nie widzę błędu, ale spoj mi go nie akceptuje
Proszę o pomoc
#include <iostream>
#include <math.h>
#include <iomanip>
#include <sstream>
using namespace std;
float r, d, r_2;
int main()
{
for(int i=0; i<20; i++)
{
cout<<"Wej\230cie:"<<endl;
cin >>r;
cin>>d;
r_2=r*r-d*d/4;
long double pole=3.141592654*r_2;
int pole_2=round(pole);
ostringstream ss;
ss << pole_2;
string pole_3 = ss.str();
int dlugosc=pole_3.length();
cout<<"Wyj\230cie:"<<endl<<setprecision(dlugosc+2)<<pole<<endl;
}
return 0;
}