Pregunta de entrevista de Talent Path

Write an algorithm that checks if a 24 hour clock is accurate or not

Respuesta de la entrevista

Anónimo

16 dic 2020

Make an integer set to 0 that will act as the index. The parameters will be 4 digits separated by a colon so you want the first 2 digits set to hours and the other 2 set to minutes. Use some logic to make sure hours isn't greater than 25 and <= 0. do the same for minutes and make sure minutes isn't greater than 59 <= 0

4