TATA ELXSI interview question

Print a star pattern using any language