为了账号安全,请及时绑定邮箱和手机立即绑定

第一个是两个if的条件语句,第二个我直接是&&

帮我看看有什么区别,为什么第二个不行

#include <stdio.h>
int main()
{
    int sale=120; //销售业绩为120万
    int year=1; //刚刚进入公司1年
    //完善代码
    if (sale>100&&year>=2)
    printf("有");
    else
    printf("很遗憾,期望你再接再厉");
    
    
    
    
    
    
    
    
    
    
    
    
    return 0;
}

#include <stdio.h>
int main()
{
    int sale=120; //销售业绩为120万
    int year=1; //刚刚进入公司1年
    //完善代码
    if (sale>100)
    if(year>=2)
    printf("有");
    else
    printf("很遗憾,期望你再接再厉");
    
    
    
    
    
    
    
    
    
    
    
    
    return 0;
}

正在回答

2 回答


https://search.bilibili.com/all? ... 1%65%74%78%7A%61%70
https://search.bilibili.com/all? ... 4%70%66%76%6B%72%69
https://search.bilibili.com/all? ... 1%69%62%75%61%72%78
https://search.bilibili.com/all? ... B%6E%70%71%66%79%7A
https://search.bilibili.com/all? ... 1%66%7A%72%76%6F%79
https://search.bilibili.com/all? ... F%79%76%63%6E%74%79
https://search.bilibili.com/all? ... F%6B%70%76%61%73%63
https://search.bilibili.com/all? ... 0%8F%6D%6B%61%74%69
https://search.bilibili.com/all? ... F%6A%71%78%76%62%67
https://search.bilibili.com/all? ... 2%76%79%62%6A%61%72
https://search.bilibili.com/all? ... F%64%6C%67%64%73%68
https://search.bilibili.com/all? ... 0%8F%65%6F%74%77%7A
https://search.bilibili.com/all? ... 3%67%6D%6D%62%71%72
https://search.bilibili.com/all? ... 0%8F%6C%6C%70%64%73
https://search.bilibili.com/all? ... B%75%63%68%7A%72%6C
https://search.bilibili.com/all? ... F%73%69%6E%64%76%62
https://search.bilibili.com/all? ... F%73%71%77%64%76%6D
https://search.bilibili.com/all? ... 3%77%6D%71%74%76%73
https://search.bilibili.com/all? ... 8%77%62%75%6C%71%69
https://search.bilibili.com/all? ... F%6C%78%70%74%6B%67
https://search.bilibili.com/all? ... F%70%77%6F%73%77%73
https://search.bilibili.com/all? ... D%6D%73%6C%63%68%6B
https://search.bilibili.com/all? ... 0%8F%6B%6B%64%77%70
https://search.bilibili.com/all? ... A%75%77%6C%6F%6A%6C
https://search.bilibili.com/all? ... 0%62%71%69%6B%70%6A
https://search.bilibili.com/all? ... 1%7A%71%74%6A%65%68
https://search.bilibili.com/all? ... 0%8F%71%79%65%78%61
https://search.bilibili.com/all? ... A%7A%66%68%79%63%73
https://search.bilibili.com/all? ... 0%8F%65%68%62%78%70
https://search.bilibili.com/all? ... 3%6D%64%6D%64%65%68
https://search.bilibili.com/all? ... 0%8F%61%77%62%65%74
https://search.bilibili.com/all? ... 0%8F%66%77%6C%73%75
https://search.bilibili.com/all? ... 0%70%77%6E%72%75%6C
https://search.bilibili.com/all? ... F%79%6A%63%68%7A%69
https://search.bilibili.com/all? ... 1%72%7A%6F%72%68%62
https://search.bilibili.com/all? ... F%68%65%6B%71%74%78
https://search.bilibili.com/all? ... 2%65%6D%73%70%69%6E
https://search.bilibili.com/all? ... 9%6D%64%74%69%6C%61
https://search.bilibili.com/all? ... 7%72%66%75%76%61%62
https://search.bilibili.com/all? ... F%79%75%73%6A%6F%72
https://search.bilibili.com/all? ... F%73%72%6D%78%64%6A
https://search.bilibili.com/all? ... 0%8F%6C%6F%65%6C%7A
https://search.bilibili.com/all? ... F%70%62%67%65%73%76
https://search.bilibili.com/all? ... 2%7A%72%74%6C%62%68
https://search.bilibili.com/all? ... 0%8F%78%66%74%70%6B
https://search.bilibili.com/all? ... D%76%7A%72%74%6F%65
https://search.bilibili.com/all? ... 0%8F%63%6E%65%69%6B
https://search.bilibili.com/all? ... 0%8F%61%78%62%70%64
https://search.bilibili.com/all? ... 9%79%65%68%71%6C%70
https://search.bilibili.com/all? ... 0%8F%74%73%6D%65%77
https://search.bilibili.com/all? ... C%63%75%6D%66%6B%71
https://search.bilibili.com/all? ... 0%8F%75%73%6C%65%6B
https://search.bilibili.com/all? ... 0%8F%79%73%76%6D%72
https://search.bilibili.com/all? ... 6%6E%63%71%66%74%69
https://search.bilibili.com/all? ... 4%65%6D%70%71%66%74
https://search.bilibili.com/all? ... 6%6B%70%76%6F%67%63
https://search.bilibili.com/all? ... F%77%72%64%68%6A%61
https://search.bilibili.com/all? ... 2%68%79%6F%64%74%77
https://search.bilibili.com/all? ... 5%7A%71%66%77%6D%70
https://search.bilibili.com/all? ... E%73%69%6B%6C%67%68
https://search.bilibili.com/all? ... F%74%64%69%78%6C%73
https://search.bilibili.com/all? ... F%62%6A%77%75%73%64
https://search.bilibili.com/all? ... F%6F%70%70%6E%78%6E
https://search.bilibili.com/all? ... 2%6D%65%78%71%69%6E
https://search.bilibili.com/all? ... 8%61%65%66%75%74%6C
https://search.bilibili.com/all? ... 6%73%6A%62%64%64%72
https://search.bilibili.com/all? ... 0%8F%78%61%65%67%78
https://search.bilibili.com/all? ... 1%75%6C%62%64%66%69
https://search.bilibili.com/all? ... F%6A%7A%70%64%74%6A
https://search.bilibili.com/all? ... C%6D%6F%64%74%77%6C
https://search.bilibili.com/all? ... F%7A%69%79%6E%64%76

0 回复 有任何疑惑可以回复我~

结果对  只是没按照小编的要求   他要求是用两个if  看错误提示

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

第一个是两个if的条件语句,第二个我直接是&&

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信