Contact Learn C
Copy

Program 388: Right Symbol Steps Pattern

Program 388: Right Symbol Steps Pattern
 
#include<stdio.h>
main()
{
    int i,j,num,k,count,c=2;
    printf("Enter number of rows\n");
    scanf("%d",&num);
    count=num-1;
    for(i=1;i<=num;i++)
    {
    for(k=1;k<=count;k++)
    {
        printf("  ");
    }
        for(j=1;j<=c;j++)
        {
            printf(" *");
           
        }
        if(i%2==0)
        {
         c+=2;
         count-=2;
        }
        
    printf("\n");
    }
}
Explanation:
 //Coming Soon


Output:
Right Symbol Steps Pattern


Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide