A switch statement gives an expression a value to evaluate and several different statements to execute based on the value…