for (r = 1; r <= height; r++)
{
// print spaces
for (i = 1; i <= height - r; i++)
cout << " ";
// print stars
// print spaces
for (i = 1; i <= r * 2 - 1; i++)
cout << "*";
cout << endl;
}
Wednesday, March 10, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment