Output an equilateral triangle figure

the following code outputs a left-aligned two-dimensional pyramid graph. How to center each line of the final graph?

{   int i,j;
for(i=0;i<4;iPP){
    for(j=0; j<i+1; jPP)  printf("*");    //   
    printf("\n");
}
C
Dec.03,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b4088a-2c502.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b4088a-2c502.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?