Infosys Interview Question

Coding question : Prime no code , factorial etc type.