C program segment to genrate pattern

#include<stdio.h>
int main()
{
    int i,j;
    
    for(i=1; i<5; i++)
    {
        for(j=0; j<i; j++){
            printf("*");
        }
        printf("\n");
    }
    
    return i;
    
    
    
}

No comments

Powered by Blogger.