def f(w,h):exec"print'|'+'- '[1<h<%d]*(w-2)+'|';h-=1;"%h*h for test in ((3,3),(5,8),(10,3)): print test f(*test) print ''
Standard input is empty
(3, 3) |-| | | |-| (5, 8) |---| | | | | | | | | | | | | |---| (10, 3) |--------| | | |--------|
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!