Does anyone thinks that this is a good code to create a solid shape diamond?
I just need to do a simple diamond with a max of 9 * in the middle of the figure
#include <stdio.h>
int main()
{
int x,y,num=20;
char symbol;
cout << "Enter a single character>;
cin>>symbol;
system("cls");
for(x = 1; x <= num / 2 + 1; x++) {
for(y = -20; y <= num - x; y++)
{
cout << ' '; }
for(y = 1; y <= 2*x - 1; y++)
{
cout<<symbol;
}
cout << end; }
for (x= num / 2 ; x >= 1 ; x--) {
for(y = -20; y <= num - x; y++)
{
cout << ' '; }
for(y = 1; y <= 2*x- 1; y++)
{
cout<<symbol;
}
cout << end; }
return 0;
}