def s(w,h,d):R,M=range,max;S,V,L=' |/';O=w-2;D=d-M(0,d-h);Q=h-M(0,h-d);print('\n'.join([S*(d-i)+L+' -'[i<1]*O+L+S*[h-1,i][i<=D-1]+'/|'[i<=D-1]for i in R(D+M(0,d-h))]+[V+[' -'[i==h],'_'][i<2]*O+V+S*[i-1,d][i>Q]+'/|'[i>Q]for i in R(Q+M(0,h-d),0,-1)]))s(int(input()),int(input()),int(input()))
10 20 30
/--------/| / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / | / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / |--------| / | | / | | / | | / | | / | | / | | / | | / | | / | | / | | / | | / | | / | | / | | / | | / | | / | | / | | / |________|/
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!