who know test 5,,,help!!!

Posted by

Virtuoz 21 Nov 2010 18:48

here is my code

int main()

{

double l, h, w,N,angle;

double P=3.14;

double g=9.81,t,speed;

cin>>l>>h>>w;

t=sqrt(2*h/(g*100));

speed=w/60;

N=t*speed;

angle=N*360;

while(angle>360)

{

angle=angle-1;

}

if(angle>90 && angle<270)

cout<<"bread";

else

cout<<"butter";

//system("pause");

}

Re: who know test 5,,,help!!!

i think you need to remember about l in counting time te total hight should be h-0,5l because you must remember that after h-0,5l it can spin arround. and you have few more mistakes but i'm not sure of that because my one its not perfect to