Capgemini interview question

Write a logic for displaying '*' in pyramid structure?