• 2021-04-14
    以下程序的功能是根据输入的“y”(“Y”)与“n”(“N”),在屏幕上分别显示出“This is YES.”与“This is NO.”。请填空。
    void YesNo(char ch)
    {
    switch(ch)
    {
    case ‘y’:
    case ‘Y’: printf(“\nThis is YES.\n”); _________;
    case ‘n’:
    case ‘N’: printf(“\nThis is No.\n”);
    }
    }
    int main()
    {
    char ch;
    printf(“Enter a char ‘y’,‘Y’or‘n’,‘N’:”);
    ch=____________;
    printf(“ch:%c”,ch);
    YesNo(ch);
    }