Capgemini Interview Question

1) Write the code logic for the given conditions in any programming language. 2) DSA 3) Technical questions