+ 8
CHALLENGE- Find ANGLE between the hands of a CLOCK
You just need to make a program that inputs a time and outputs the angle made by the hands of the clock at that time. eg- INPUT - 3:00 OUTPUT - 90
67 Answers
+ 9
+ 9
Thanks for the challenge.
Here's my try :
https://code.sololearn.com/W35V56N2KXcZ/?ref=app
+ 7
here's my code..🐍
https://code.sololearn.com/c105VpeJ8gSB/?ref=app
+ 5
@Saurav
Thanks... ☺️
+ 4
@Lukartodo
Great program.
That's a perfect one in #WEB catagory.
+ 4
@Saurav I have rectified d reflex angle issue
+ 4
Improved version of my code based on the comments of @Saurav and inspired by the exception handling of @Yerucham https://code.sololearn.com/cDgqbsPX9Wk8/?ref=app
+ 4
I have fixed that, now it calculates to produce only non-reflex angles
+ 4
Thank you guys for participating in the conversation. You all have come up with great programs.
We have some perfectly great programs by-
## Lukartodo - Web
## Yerucham - Java
## Ankit - Python
Now take a look at my C++ program.
And please do comment about any MISTAKE or FLAW in my code.
https://code.sololearn.com/cryL0B0K14zF/?ref=app
+ 4
@saurav
I just remodified my submission please check if there be any more errors now it calculates to float-point accuracy
https://code.sololearn.com/cY8NnBtedbaM/?ref=app
+ 3
https://code.sololearn.com/cHlefuiSHyyJ/?ref=app
+ 3
heres my one line code..
with FLOATING POINT ACCURACY
https://code.sololearn.com/cjKsL1AJYGDr/?ref=app
+ 3
@Sayan
@Kartikey
You both have made unexpectedly small programs. They are just 1 liner. Guys, do take care about the inputs you take. The programs even accept inputs that are not valid.
+ 3
@Kartikey
You shouldn't declare 12:4 as invalid time.
That's unfair in its part.
+ 3
marking thread
+ 3
https://code.sololearn.com/cDgqbsPX9Wk8/?ref=app here's my solution
+ 3
@Stoyan
Try to avoid reflex angles bro. Just add a line more to your program for converting reflex angles.
And do look for other errors.
You may get hints from the discussion.
+ 3
@Saurav point taken m8. I didn't know that they were an issue since a clock is 360 degrees
+ 3
@Stoyan
I welcome you in the race of making a perfectly flawless program.
All the best.