Skip to the task
Layout
Back to classic view

You are looking ahead. Your place is still task 1: Modules.

RUNTask 5 of 26 · step 3: How long a lecture lastsA lecture 10:15–11:45
A lecture 10:15–11:45 in practice/02/

File → Reload CMake Project, pick p07_duration and ▶. Type 10, 15, 11, 45.

Checklist

  • Every task is one commit with a clear message.
  • Zero compiler warnings: the code builds with -Werror.
  • Once per topic you step through your code in the debugger (CLion, gdb).
  • Every function has preconditions and postconditions, and assert tests check them.
  • A multi-file program: .h files with Doxygen comments and their own CMake target.
Details & hint
$ .\build\debug\practice\07\p07_duration.exe
Start
Hour: 10
Minutes: 15
End
Hour: 11
Minutes: 45
Lecture 10:15-11:45, duration 90 min (1 h 30 min)

You should see: 615 and 705 minutes: the difference is 90 min, or 1 h 30 min.

practice 02 CMakeLists.txt Code Diff
UNCHANGED This step does not change this file.
add_executable(p02_card main.c)
target_link_libraries(p02_card PRIVATE course_input)
opened for this task
$ .\build\debug\practice\07\p07_duration.exe
Start
Hour: 10
Minutes: 15
End
Hour: 11
Minutes: 45
Lecture 10:15-11:45, duration 90 min (1 h 30 min)