Meditab Software interview question

Write code to print star pattern on the screen.