Friday, May 04, 2012

C Program That Print Right Triangle

Hello Guys how are you i hope you are enjoying my blogs i will try to resolve all your problems throught my blogs,today i am sharing a C program with all of you just see the code and if you thought that this is not a good code then send me your code.

In this program i am printing the following pattern

 
         *
      *  *
   *  *  *
*  *  *  *

#include<stdio.h>
#include<conio.h>
int main()
{
 int i,j,k;
 clrscr();
 printf("\n HERE IS YOUR BEAUTIFUL PATTERN:\n");
 for(i=1;i<=5;i++)
 {
  for(k=i;k<=4;k++)
  {
   printf("  ");
  }
  for(j=1;j<=i;j++)
  {
   printf(" *");
  }
  printf("\n");
 }
 getch();
 return(0);
}

                 Thanking You friends...........

No comments:

Post a Comment

Please Give Me Your Views

Popular Posts