Capgemini Engineering interview question

In coding they have asked about 1. Inverted pyramid 2 . Looping