Preview:
// Online C compiler to run C program online
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

print like this in the output;

XX
XXXX
XXXXXX
XXXXXXXX
XXXXXXXXXX


int main() {
    int line,col;
    for(int line=1;line<=5;line++)
    {
    for(int col=1;col<=line*2;col++)
    {
        printf("X");
    }
    printf("\n");
    }
        
        
        
        
    return 0;
}
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