⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 switch.c

📁 里面包含很多c语言的源码
💻 C
字号:
/* Demonstrates the switch statement. */

#include <stdio.h>

int main( void )
{
    int reply;

    puts("Enter a number between 1 and 5:");
    scanf("%d", &reply);

    switch (reply)
    {
        case 1:
            puts("You entered 1.");
        case 2:
            puts("You entered 2.");
        case 3:
            puts("You entered 3.");
        case 4:
            puts("You entered 4.");
        case 5:
            puts("You entered 5.");
        default:
            puts("Out of range, try again.");
    }

    return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -