They're supposed to look something like this (the center row goes up to 10):
* * * ** ** ** *** *** *** **** **** **** *** *** *** ** ** ** * * *
#include <iostream>
using namespace std;
int main()
{
int i = 1;
for (int x = 0; x < 10; x++)
{
for (int y = 0; y < i; y++)
{
cout << "*";
}
cout << endl;
i++;
}
i -= 2;
for (int x = 0; x < 10; x++)
{
for (int y = 0; y < i ; y++)
{
cout << "*";
}
cout << endl;
i--;
}
return 0;
}
This post has been edited by Dogstopper: 01 March 2011 - 03:10 AM
Reason for edit:: Added code tags to the shapes.

New Topic/Question
Reply




MultiQuote



|