Accenture Interview Question

one coding question