问答详情
源自:4-4 分支结构之嵌套if-else语句

各位大佬们帮我看一下哪儿有问题啊?谢谢了,在线等

#include <stdio.h>
int main()
{
    int sale=120; //销售业绩为120万
    int year=1; //刚刚进入公司1年
    //完善代码
    if(sale>100)
    {
        if(year>=2)
        {
            printf("%s\n","you'xiu'yuan'gong);
        }
    printf("%s\n","很遗憾,期望你再接再厉");

    }
    else
    {
          printf("%s\n","很遗憾,期望你再接再厉");
    }
   
   
   
   
    return 0;
}

下面是运行结果------------------------------------------------------------------------------

hello.c: In function 'main':
hello.c:11:27: warning: missing terminating " character [enabled by default]
             printf("%s\n","you'xiu'yuan'gong);
                           ^
hello.c:11:13: error: missing terminating " character
             printf("%s\n","you'xiu'yuan'gong);
             ^
hello.c:12:9: error: expected expression before '}' token
         }
         ^
hello.c:12:9: error: expected ';' before '}' token
hello.c:13:1: error: stray '\343' in program
    printf("%s\n","很遗憾,期望你再接再厉");
 ^
hello.c:13:1: error: stray '\200' in program
hello.c:13:1: error: stray '\200' in program
hello.c:13:1: error: stray '\343' in program
hello.c:13:1: error: stray '\200' in program
hello.c:13:1: error: stray '\200' in program
hello.c:13:1: error: stray '\343' in program
hello.c:13:1: error: stray '\200' in program
hello.c:13:1: error: stray '\200' in program
hello.c:13:1: error: stray '\343' in program
hello.c:13:1: error: stray '\200' in program
hello.c:13:1: error: stray '\200' in program

提问者:Swift1999 2017-08-14 12:53

个回答

  • 慕粉4041167
    2017-08-14 15:05:31

    应该是打中文的时候输入法没有切换回英文的模式。