Illustration of a right octagonal prism, with octagons for bases and rectangular faces, that is resting…