#include <iostream>
#include <string>
usingnamespace std;
int main()
{
char SPACE = ' ';
int N;
cout << "Input N: "; cin >> N;
int N2 = 2 * N;
string L, R, blanks( N2, SPACE );
for ( int i = 0; i < N; i++ ) { L += "\\ "; R += " /"; }
L = blanks + L; R = R + blanks;
for ( int i = N2; i > 0; i-- ) cout << L.substr( i, N2 ) << R.substr( N2 - i, N2 ) << endl;
}
#include <iostream>
#include <string>
usingnamespace std;
string operator *( int n, string s )
{
string result;
if ( n <= 0 ) return"";
while ( n-- ) result += s;
return result;
}
int main()
{
string B = " ", L = "\\ ", V = "\\/", R = " /";
int N;
cout << "Input N: "; cin >> N;
for ( int i = 0; i < 2 * N; i++ )
{
int diag = N - ( i + 1 ) / 2;
cout << i * B + diag * L + ( i % 2 ) * V + diag * R << '\n';
}
}