Can you explain why it's a post about void functions?
void Shape(int r, char c1 = '^', char c2 = '#')
{
for (int i = 0, n = r+r; i <= r; i++) {
for (int j = 0; j <= n; j++)
cout << (abs(j-r)>i?c1:c2);
cout << '\n';
}
}
...
Shape(5);
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348