The upper armor of tanks and warships is much thinner than the armor designed to defend against horizontal fire, mainly because it is so unlikely to be hit. Some coastal fortresses took advantage of this and used mortars hidden in small gun pits, allowing the defenses to attack the decks of warships while being almost impossible to hit with return fire.
Could tanks and warships have been equipped with similar weapons, allowing their shells to strike the weaker upper armor? Would it have been possible to build the mortars in such a way that they wouldn't require an open barbette, and yet still provide range sufficient for fighting tanks and ships armed with conventional guns and cannons?