IT HOME Programming care

IT HOME Programming Care

Sunday, January 29, 2017

Pyramid code by C Programming


#include<stdio.h>

main()

{

  int i,j,k=0;

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

for(j=5;j>i;j--)

printf(" ");

  for(j=1;j<=(i+k);j++)

printf("*");

/*for(j=1;j<=i;j++)

  printf("*");

for(j=2;j<=i;j++)

printf("*");*/

k++;

printf("\n");

}

}

   
     
         
    
         
     
        
       
           
           
       
   

0 comments:

Post a Comment

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();

IT HOME Freelancing Care