Add Topic

C Programming

waiting answer July 12, 2021

C Program to Use Switch Statement Display Monday to Sunday

January 20, 2021
    int main()
        int day;
        printf("\nEnter a day:");
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            default :
                printf("Invalid Input");
        return 0;


       Enter a day:1

Note: When a number of multiple choices need to be evaluated or executed, then the switch statement is a better selection statement. Switch statement is a multiway branch statement.

0 0

Please Login to Post the answer

Leave an Answer