Question d’entretien chez Cognizant

Write a code for star based pattern