Exam
Opened: Friday, 18 September 2026, 1:35 PM
Closed: Friday, 18 September 2026, 3:40 PM
Completion requirements
All solutions must be implemented as functions in a single C++ source file named exam.cpp and invoked from main.cpp for demonstration and/or testing purposes using assert. This invocation is made possible through the header file exam.h. Remember to follow proper code formatting and include explanatory comments.
If a problem states: “given A and B, find C,” this means that A and B are the function’s input parameters, and C is its return value. Printing inside functions is strictly prohibited.
When grading each task, correctness alone will not be sufficient - code quality will also be evaluated, including:
- Proper indentation and spacing;
- Meaningful variable and function names;
- Presence of clear and useful comments;
- Use of
assertto validate preconditions on function parameters; - Appropriate choice between prefix and postfix forms of
++/--; - Effective use of helper functions;
- And many other aspects of good programming practice.
If the project fails to compile, the entire assignment will receive 0 points.