Manhattan Associates Interview Question

Write Code for generating pattern of stars on left and right side.