boolean a = false;
for (int i = 0; i < string.length(); i++) {
if (string.charAt(i) == '\r') {
a = true;
break;
}
}
if (a==true)
{string1 = string1 + string+" ";a=false;}
else
string1 = string1 + string;
// System.out.println(string);
}
double func(double X, double epsilon)
{
double r = 0, r1=0;
r+=pow(X,1)/fact(1);
r1=r + pow(-1,2.0)*pow(X,3)/fact(3);
for(double n=0;fabs(r-r1)>epsilon;n++)
{
r+=pow(-1,n)*pow(X,2*n+1)/fact(2*n+1);
r1=r + pow(-1,n+1)*pow(X,2*n+1+1)/fact(2*n+1+1);
}
return 1/r;
}
}