Program to print alphabet X in C Language without Graphics

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

#include<stdio.h>

int main()

{

int i, j;

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

{

    printf("\t");                   //for horizontal tab

    for(j=1; j<=5; j++)
   
     {

       if( i==j || j==5-i+1)

       printf("*");        // allow star

       else

       printf(" ");        // allow space

    }

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

}

return 0;

}


Output:


*        *
  *    *
     *
  *    *
*        *
         

Practical demonstration in Pictorial form-


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


Output:-

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

⏪ Program to Print Alphabet W                                                               Program to Print Alphabet Y⏩

No comments:

Post a Comment