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

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

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

#include <stdio.h>

int main()

{

? ? double money =12? ? ? ;?

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

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

? ? 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("小編能不能打車回家呢:");?

? ? 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行會改變倒數(shù)第三行的打印結(jié)果。好恐怖,不是n了。刪除第10和第12都沒事。

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

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

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

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

weixin_慕絲3003608

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

寶慕林9803269 提問者

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

舉報

0/150
提交
取消

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

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

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

幫助反饋 APP下載

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

公眾號

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