0
This clock is odd
I don’t understand why the input of 12 reads out “pm”. Any help would be appreciated function main() { var hour = parseInt(readLine(), 12); // Your code goes here time = hour >= 0 && hour <= 12 ? "am" : "pm" ; console.log(time) }
2 Respuestas
+ 3
parseInt(readLine(), 12)
readLine() is the input, not 12. The number is the base for conversion. You need base 10. Do not change the given input code.
0
Thank you lisa. I muat have messed with it when i was making my own code, before i resulted to cheating lol