Tuesday, January 8, 2019

C Program To Print Pattren Of Triangle Shape

Star pattern triangle shape

Star pattern of triangle shape
In this c program we will print a pattern of triangle shape by using two for loop by nesting.

   /*
      Program : Star Pattern Of Triangle Shape
      Filename : star2.c
      IDE Used To Developed : CodeBlocks
      Developed By : Pavito Golui
   */
  #include<stdio.h>
  int main()
   {
      int i,j;
        for(i=1; i<=5; i++)
         {
             for(j=1; j<=i; j++)
               {
                   printf(" * ");
               } 
              printf("\n");
         }
      return (0);
   }
 

Output :

   *  
  *  * 
  *  *  *
  *  *  *  * 
  *  *  *  *  * 




0 comments:

Welcome to you in All Coding Help