How to make diamond in C++. Size of diamond is depend upon user ??
#include<conio.h>
using namespace std;
main()
{
int size;
cout<<"how large u want.. ";
cin>>size;
for(int i=1;i<=size;i++)
{for(int j=size;j>=i;j--)
cout<<" ";
for(int j=1;j<=i;j++)
cout<<"* ";
cout<<"\n";}
for( int i=size;i>=1;i--)
{for( int j=size;j>=i;j--)
cout<<" ";
for(int j=1;j<=i;j++)
cout<<"* ";
cout<<"\n";}
getch();
}