TRIANGLE OF STARS

Minggu, 06 April 2014

A C Program to Print          

    *
   **
  ***
 ****
*****
void main()
{
int i,j,k,n;
clrscr();
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=n-1;j>=i;j--)
{
printf(" ");
}
for(k=1;k<=i;k++)
{
printf("*"); 
}
printf("
"); 

}
getch();

Related Posts by Categories

0 komentar:

Posting Komentar

Copyright © 2010 All About Tech Information | Powered By Blogger