Program to print alphabet Y in C Language without Graphics

// Program to print alphabet Y in C with C Bhasha Gyan

#include<stdio.h>

int main()

{

int i, j;

for (i=1; i<=6; i++)

{

    printf("\t");              //for horizontal tab
   
    for(j=1; j<=6; j++)
   
     {

       if(( i==j && i<=3) || j==6-i+1)

       printf("*");        // for star

       else

       printf(" ");        // for single space

    }

   printf("\n");          //for new line

}

return 0;

}


Output:


*        *
  *    *
    **
    *
  *
*

         

Practical demonstration in Pictorial form-


Program to print alphabet Y in C Language without Graphics
Program to print alphabet Y in C Language without Graphics

Output:-

Program to print alphabet Y in C Language without Graphics Output
Program to print alphabet Y in C Language without Graphics Output

⏪ Program to Print Alphabet X                                                               Program to Print Alphabet Z⏩

No comments:

Post a Comment