char a [n][n];
int i, j, m;
m = n/2;
if ( n % 2 == 0) m--;
for(i = 0; i <= m; i++) {
for(j = 0; j <= i; j++) {
a[i][j] = '*';
a[n - i - 1][j] = '*';
}
for(j = i + 1; j < n; j++) {
a[i][j] = '-';
a[n - i - 1][j] = '-';
}
}
2007/3/18, BiGYaN <[EMAIL PROTECTED]>:
>
>
> Please don't post homework questions here. This problem is too simple
> for a group calling themselves "Algorithm Geeks".
>
> I hope most of you'll agree to this and put a stop to this practice.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---