請(qǐng)問(wèn)我這個(gè)哪里有問(wèn)題啊 寫(xiě)的運(yùn)行正確結(jié)果不對(duì)
#include <stdio.h>
int main()
{
??? //定義小編兜里的錢(qián)
??? double money = 12.00;
??? //定義打車(chē)回家的費(fèi)用
??? double cost = 11.50;?
??? printf("小編能不能打車(chē)回家呢: ");
??? //輸出y小編就打車(chē)回家了,輸出n小編就不能打車(chē)回家
??? printf("%c\n", cost <= money ? 'n' : 'y');
??? return 0;
}
2019-05-06
n和y換換地方 運(yùn)行結(jié)果就對(duì)了?
?? 要不就 printf("%c\n", money> cost? 'y' : 'n');
使輸出結(jié)果為:小編能不能打車(chē)回家呢: y