The British also had their M-class submarine at the end of World War One. Armed with one 12 inch cannon (surplus off a pre-dreadnought), they were designed for coastal bombardment. But it was reasoned that they could be used in things like raiding, since torpedoes at that time were still very short ranged and not considered very reliable against moving targets. An flat and level 12 inch gun shot at the waterline at torpedo ranges should cripple or sink just about anything short of an armored cruiser or a battleship in those days.