為什么我會(huì)錯(cuò)呢
#include <stdio.h>
int main()
{
? ? //定義小編兜里的錢
? ? int money = 12 ? ;?
? ? //定義打車回家的費(fèi)用
? ? double cost = ?11.5 ; ?
? ? printf("小編能不能打車回家呢:");?
? ? //輸出y小編就打車回家了,輸出n小編就不能打車回家
? ? printf("%c\n",money>=cost? 'y' : 'n');
? ? return 0;
}
2017-08-15
#include <stdio.h>
int main()
{
? ? //定義小編兜里的錢
? ? int money = 12 ? ;
? ? //定義打車回家的費(fèi)用
? ? double cost = ?11.5 ;
? ? printf("小編能不能打車回家呢:");
? ? //輸出y小編就打車回家了,輸出n小編就不能打車回家
? ? printf("%c\n",money >= cost ? 'y':'n');//最右邊的括號(hào)錯(cuò)了
? ? return 0;
}
你的符號(hào)有的打成中文的了,