Search found 1 match

by AT-2012
Sun May 27, 2012 10:04 pm
Forum: Volume 5 (500-599)
Topic: 579 - Clock Hands
Replies: 44
Views: 13694

Re: 579 - ClockHands

Plz!! Someone help me out wid this code. I got WA.
579: Code


#include<stdio.h>
#include<math.h>
int main()
{
float h,m,ang,n;
while(scanf("%f:%f",&h,&m)==2)
{
if(h==0 && m==0) break;
ang=((h*60+m)/2-(m*6));
if(ang>180) ang=360-ang;
if(ang<0) ang=fabs(ang);
printf("%.3f\n",ang);
}
return 0;
}

Go to advanced search