Skip to content
Brainlag
  1. Library
  2. Challenges
  3. C

Turn a clock time into minutes

Parse a time like "12:45" into minutes after midnight, character by character, and reject anything that is not a real time.

CCore20 minCode

Code

Inside: 2 checks, no scaffolding.

See what’s includedAlready have Brainlag Code? Sign in

Code editor. Press Control or Command plus Enter to run the code. Tab indents; to move focus out of the editor, press Escape and then Tab.