第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

運(yùn)行兩次,倒數(shù)第三個(gè)位置沒(méi)變,結(jié)果卻變了?

#include <stdio.h>

int main()

{

? ? double money =12? ? ? ;?

? ? double cost =11.5? ? ? ?;??

? ? printf("小編能不能打車(chē)回家呢:");?

? ? printf("%c\n",money>=cost?'y':'n');

? ? printf("%c\n",(money>=cost)?'y':'n');

? ??

? ? printf("%c\n",(money>cost)||(money=cost)?'y':'n');

? ? printf("%c\n",(money=cost)||(money>cost)?'y':'n');

? ? printf("%c\n",((money>cost)||(money=cost))?'y':'n');

? ??

? ? printf("%c\n",(money>cost)&&(money=cost)?'y':'n');

? ? printf("%c\n",(money=cost)&&(money>cost)?'y':'n');

? ? printf("%c\n",((money>cost)&&(money=cost))?'y':'n');

? ??


? ??

? ??

? ? return 0;

}

#include <stdio.h>

int main()

{

? ? double money =12? ? ? ;?

? ? double cost =11.5? ? ? ?;??

? ? printf("小編能不能打車(chē)回家呢:");?

? ? printf("%c\n",money>=cost?'y':'n');

? ? printf("%c\n",(money>=cost)?'y':'n');

? ??

? ? printf("%c\n",(money>cost)||(money=cost)?'y':'n');

? ? printf("%c\n",((money>cost)||(money=cost))?'y':'n');

? ??

? ? printf("%c\n",(money>cost)&&(money=cost)?'y':'n');

? ? printf("%c\n",(money=cost)&&(money>cost)?'y':'n');

? ? printf("%c\n",((money>cost)&&(money=cost))?'y':'n');

? ??


? ??

? ??

? ? return 0;

}


正在回答

2 回答

復(fù)制上半部分,把格式改標(biāo)準(zhǔn),刪除第11行會(huì)改變倒數(shù)第三行的打印結(jié)果。好恐怖,不是n了。刪除第10和第12都沒(méi)事。

0 回復(fù) 有任何疑惑可以回復(fù)我~

(money>cost)&&(money=cost)

'&&'意思是前后條件都要滿足,所以原因就很簡(jiǎn)單了

1 回復(fù) 有任何疑惑可以回復(fù)我~
#1

weixin_慕絲3003608

||是“或”,是只要有一個(gè)滿足條件就可以了
2021-07-21 回復(fù) 有任何疑惑可以回復(fù)我~
#2

寶慕林9803269 提問(wèn)者

這是倒數(shù)第三行\(zhòng)n: printf("%c\n",(money>cost)&&(money=cost)?'y':'n'); 問(wèn)題中下面int main()運(yùn)行結(jié)果倒數(shù)第三個(gè)是y。 上面的int main()運(yùn)行結(jié)果倒數(shù)第三個(gè)是n。 我的問(wèn)題是: printf("%c\n",(money>cost)&&(money=cost)?'y':'n');這個(gè)運(yùn)行結(jié)果為什么不確定。
2021-07-22 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

運(yùn)行兩次,倒數(shù)第三個(gè)位置沒(méi)變,結(jié)果卻變了?

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)