Capgemini Interview Question

Pseudo code for simple program like print the sum of digits. Like that