Pregunta de entrevista de AMD

C++ coding, asked to code everything