admin管理员组

文章数量:1558341

程序运行示例1如下:
****TIME****
1.morning
2.afternoon
3.night
Enter your choice:2
Good afternoon
程序运行示例2如下:
****TIME****
1.morning
2.afternoon
3.night
Enter your choice:4
Selection wrong
#include<stdio.h>
int main()
{
    int n;
    printf("****TIME****\n");
    printf("1.morning\n");
    printf("2.afternoon\n");
    printf("3.night\n");
    printf("Enter your choice:\n");
    scanf("%d", &n);
    switch(n)
    {
    case 1:
        printf("Good morning\n");
        break;
    case 2:
        printf("Good afternoon\n");
        break;
    case 3:
        printf("Good night\n");
        break;
    default:
        printf("Selection wrong\n");
        break;
    }
    return 0;
}

本文标签: 时间表序号根据提示操作人员