Accenture Interview Question

basic coding question