Code In Tech - The Ultimate World of Computer Technology

Tuesday, 27 March 2012

C program to print following pattern of star

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

SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main();
{
 int i,j;
 clrscr();
 for(i=1;i<=5;i++)
 {
  for(j=1;j<=5;j++)

  {
   printf("*");
  }
  printf("\n");
 }
getch();
}

No comments :

Post a Comment