Robert Bosch Interview Question

Coding questions to print given pattern and prime numbers