Capgemini Engineering Interview Question

to write a program using structure.