+ 2
Some problems in my code
Here is a code in C++ for an app that calculates the angle between the two pointers of the clock in a certain time. However, there seems to be some logical errors. I would appreciate any help that I can get. https://code.sololearn.com/cZHE3lOc0L95/?ref=app
6 Answers
+ 2
bro! We are talking about real clocks, you must notice that the hour hand at 12:30 is NOT on 12.. It's exactly in the middle between 12 & 1, and that will surely change the angle.. That's the purpose of 25th line. Did you understand now?
+ 1
You haven't checked if the inputs are negative values. And you can write the assignment in shorter versions while still preserve readability.
+ 1
I managed the negative values stuff but I still can't understand the other problems you find
+ 1
25th line is important because I the hand of hour's place changes through the minutes
+ 1
K get it. Sorry for that
+ 1
No problem đ