do anybody know why my program is not working corectly i still have wrong answer. i am sure that the algorithm is ok because on all test he was giving good answer.
here's my code:
<code=c++>
#include <cstdlib>
#include <iostream>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{
float l, h, omega;
double long wynik, obroty_wykonane;
cin>> l >> h >> omega;
obroty_wykonane=((omega/60)*sqrt(((h-(0.5*l))/450.5)));
wynik=obroty_wykonane-floor(obroty_wykonane);
if (wynik>0.25 && wynik<0.75) {cout << "bread"<< endl;}
else {cout << "butter"<< endl;}
return EXIT_SUCCESS;
}
</code>
and the problem is http://acm.timus.ru/problem.aspx?space=1&num=1800
thanks for help and sorry for my engish:)