Netduma interview question

Code an app in cpp