We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7e85f6 commit a1863dcCopy full SHA for a1863dc
src/code-challenges/code-challenges-003-010.js
@@ -0,0 +1,14 @@
1
+/**
2
+ * Q003: Simple clock angle
3
+ * Problem
4
+ * You will be given a number N that represents where the minute hand currently is on a clock.
5
+ * Your program should return the angle that is formed by the minute hand and the 12 o'clock mark on the clock.
6
+ */
7
+
8
+function simpleClockAngle(number) {
9
+ // we got 6 because 360(degree)/60(minute) = 6;
10
+ // 360 represents the full number of a degrees in a circle and
11
+ // 60 is the number of minutes on a clock, so dividing these two numbers
12
+ // gives us the number of degrees for one minute
13
+ return 6 * number;
14
+}
0 commit comments