Header Ads

Learn Together, Stay Connected.

পিরামিড প্রিন্ট করা-C


#include <stdio.h>

int main()
{
    int i,j;
    for(i=1;i<=4;i++)
    {
        for(j=4-i;j>=1;j--)
        {
            printf(" ");
        }
        for(j=1;j<=(2*i-1);j++)
        {
            printf("*");
        }
        if(i!=4)
        {
            printf("\n");
        }
    }

return 0;
} 

No comments

Theme images by Dizzo. Powered by Blogger.