Advertisement

Making a "S" 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<=3;i++)
      {
                       for(j=1;j<=5;j++)
                       {
                                        printf("*");
                                        }
                                        printf("\n");
                                        }
      for(i=1;i<=3;i++)
      {
                       for(j=1;j<=10;j++)
                       {
                                         printf("*");
                                         }
                                         printf("\n");
                                         }
      for(i=1;i<=3;i++)
      {
                       for(j=1;j<=5;j++)
                       {
                                        printf(" ");
                                        }
                       for(j=1;j<=5;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