Question d’entretien chez think-cell

Write a function in C++ that implements a given functionality.