Robert Bosch interview question

Coding questions to print given pattern and prime numbers