PHP, 306 Bytes ============== for($p=str_pad;$i++<$a=$argn;)$r[$i==$a||!($i%2)][]=sprintf("%02d",$i);echo strtr("01112344453",($a>1?[$p("+",$c=($a/2^0)*5+1,"----+")."\n",$p("|",$c," |")."\n","| ".join(" | ",$r[0])." |\n"]:["","",""])+[3=>$p("+",$c=ceil($a/2)*5+1,"----+")."\n",$p("|",$c," |")."\n","| ".join(" | ",$r[1])." |\n"]); replace `["","",""]` with `["\n","\n","\n"]` if you want newlines for case `1` [Try it online!](https://tio.run/nexus/php#pY5NjsIwDIX3nCJYRkpIYJq2bCYEDhIyqGr5CRq1Uegydy8GCXEALC/s9z75ebuP1zjDJl16q810HhLHaO9jOsamMxik3GJjX74RmBwGS1vOc45hUQrvvL3HFPrxzGFRlB0oDMKc2uvA6MiYOBRa67Kq63pTgeLY7PTeYeQgCW0tCT/lXyGWG6kVrKgkiDUcenIJyk9IAaPKbx0yg/VtCD0HRqOirwpPHsvk@l8HhDzbC@kqu/tktafw/8r7Mk1/0oSZpgc "PHP – TIO Nexus")