I have been receiving lot of emails and requests through the forums and inline forums attached to the tutorials about how to print pyramids and diamonds in different formats.

So, here in this article I will demonstrate how you can print pyramids and diamonds using for loop and if condition using C Programming. Building a pyramid in c programming is quite easy, but you must have the understanding of how for loop works. With some slight modifications you can print different shapes as well.

Need more details about this code – Click here for an article on this topic.

Logitech G502 HERO High Performance Wired Gaming Mouse
Unleash your gaming potential with the Logitech G502 Hero Gaming Mouse – precision, customizability, and comfort for the ultimate competitive edge!
View on Amazon

This program is compiled and tested using Dev C++ compiler, however you can use any other C/C++ compiler with slight modifications in the code.