BCS Technology interview question

Q: write a code that output a pyramid star