以下程序的功能是从在屏幕上显示一张如下所示的菜单: *****Time***** 1 morning 2 afternoon 3 night Please enter your choice: 程序根据输入的时间序号显示相应的问候信息,选择1显示“Good morning”,选择2显示“Good afternoon”,选择3显示“Good night”,其他选择显示“Selection error!” 程序运行示例1: *****time***** 1 morning 2 afternoon 3 night Please enter your choice: 2↙ good afternoon 程序运行示例2: *****time***** 1 morning 2 afternoon 3 night Please enter your choice: 6↙ Selection error! 将下面程序填写完整 #include <stdio.h> void display(); void choice(int x); int main() { int n; _____________; scanf("%d", &n); ____________; return 0; } void display() { printf("*****time*****\n"); printf("1 morning\n"); printf("2 afternoon\n"); printf("3 night\n"); printf("Please enter your choice: "); } void choice(_____________) { switch (x) { case _____________: printf("good morning\n"); break; case _____________: printf("good afternoon\n"); break; case _____________: printf("good night\n"); break; default: printf("Selection error!\n"); } }
A、display() choice(n) int x 1 2 3
B、display() choice(n) int x '1' '2' '3'
C、display(n) choice() int x 1 2 3
D、display(n) choice() int x '1' '2' '3'