Update exam_generator.cpp

just some minor fixes