The volume of the pyramid would be 80 cubic centimeters. The reason for this is because the formula for volume of a pyramid is 1/3bh, so if all the dimensions are the same for both figures, just divide the volume of the prism by three to find the volume of the pyramid. If you do this 240÷3=80 or the volume of the pyramid.
In perpendicular lines, the slopes are opposite reciprocal. This means you flip the sign (from + to - or from - to +) and flip the numerator and denominator.