My photo
Bangalore, Karnataka, India
Extending one hand to help someone has more value rather than joining two hands for prayer

Archives

pattern2

Tuesday, September 1, 2009

#include<iostream.h>
#include<conio.h>
void main()
{
 clrscr();
 for(int i=0;i<5;i++)
 {
  for(int j=1;j<=5-i;j++)
  cout<<"*";
  for(int k=0;k<2*i-1;k++)
  cout<<" ";
  if(i==0)
  cout<<"****";
  else
  {for(int l=0;l<=4-i;l++)
  cout<<"*";}
  cout<<endl;
  }
  getch();
  }

0 comments: