Capgemini Interview Question

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