|  | 
|  | 
| вернуться в форум | WA5 Послано kilik  7 дек 2013 01:52#include <iostream>#include <cmath>
 #include <iomanip>
 
 using namespace std;
 
 int main()
 {
 double t = 0;
 double eps;
 double x, y;
 cin>>x>>y>>eps;
 
 
 eps=eps*0.001;
 while(1)
 {
 double c = cos(t) - y;
 double d = sin(sqrt(t)) - x ;
 if( c*c+d*d > eps/2)
 t+=0.007;
 else
 {
 break;
 }
 }
 cout<<fixed<<setprecision(5)<<t;
 return 0;
 }
 Can someone tell what is wrong or give some tests?(my mail kilik94@yandex.ru) Thanks in advance!
 
 Edited by author 07.12.2013 01:58
Re: WA5 Послано b108  29 янв 2014 18:34Why "> eps/2" ? May be "> eps**2"? | 
 | 
|