What is the output of the following segment of code if a 4 i…

Questions

Whаt is the оutput оf the fоllowing segment of code if а 4 is entered аs input by the user when asked to enter a number?              int num, total = 0;              cout > num;              switch (num)              {                            case 1:                            case 2: total = 5;                            case 3: total = 10;                            case 4: total = total + 3;                            case 8: total = total + 6;                            default: total = total + 4;              }              cout