Advertisement

Making a programme to Output "I" shape

#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
      int i,j;
      for(i=1;i<=3;i++)
      {
                       for(j=1;j<=10;j++)
                       {
                                         printf("*");
                                         }
                                         printf("\n");
                                         }
      for(i=1;i<=9;i++)
      {
                       for(j=1;j<=3;j++)
                       {
                                        printf(" ");
                                        }
                       for(j=1;j<=4;j++)
                       {
                                        printf("*");
                                        }
                        for(j=1;j<=3;j++)
                        {
                                         printf(" ");
                                         }
                                         printf("\n");
                                         }
               for(i=1;i<=3;i++)
               {
                                for(j=1;j<=10;j++)
                                {
                                                  printf("*");
                                                  }
                                                  printf("\n");
                                                  }
                                                
                                                
              getch();
              }       
                                                 

No comments:

Post a Comment

Please comment bellow. Share your knowledge