Capgemini Interview Question

Prime number,fibonacci program logic about my project