Showing posts with label Star 1. Show all posts
Showing posts with label Star 1. Show all posts

Wednesday, July 6, 2011

Star Pattern


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




#include<iostream.h>
#include<conio.h>
void main()
{
  clrscr();
  int r,i,j;
  cout<<"Enter the range:"<<endl;
  cin>>r;
  for(i=0;i<r;i++)
  {
    for(j=0;j<=i;j++)
    {
      cout<<"*";
    }
    cout<<"\n";
  }
  getch();
}