Monday, December 17, 2012

STAR PRINTING 4 IN C++


#include<iostream.h>
void main()
{
int count,i, n=10;
for(count=0;count<=n;count++)
{
for(i=0; i<count;i++)
{
cout<<" ";
}
for(int j=10; j>count;j--)
{
cout<<"*";
}
cout<<endl;
}
}

/*
OUTPUT
*/

No comments: