#include <stdio.h> int main() { int i,j, k = 0; for (i = 1; i <= 5; ++i) { for (j = 1;j<= 5 - i; ++j) { printf(" "); } for(k=0;k!=2*i-1;++k) { printf("* "); } printf("\n"); } return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter