Tuesday, February 14, 2012

C++ Program for Pattern of star traingle

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




Code:-






#include "stdafx.h"
#include <iostream>
using namespace std;




int main()
{
int i,j;
for(i=0;i<5;i++)
{
for(j=0;j<=i;j++)
{
cout<<"*";
}
cout<<"\n";
}
return 0;
}

No comments:

Post a Comment