"%c\n", 是什么鬼意思?
#include <stdio.h>
int main()
{
? ? //定義小編兜里的錢
? ? double money = 12 ? ? ;?
? ? //定義打車回家的費用
? ? double cost = ?11.5 ? ? ; ?
? ? printf("小編能不能打車回家呢:");?
? ? //輸出y小編就打車回家了,輸出n小編就不能打車回家
? ? printf("%c\n", money>=cost?'y':'n' ? ? ? ? ? ? ? ? ? ? ? );
? ? return 0;
}
2015-11-09
%c是格式輸出符,表示輸出單個字符。
\n是轉(zhuǎn)義字符,表示換行。
相關(guān)知識點:http://idcbgp.cn/code/5119
? ? ? ? ? ? ? ? ? ??http://idcbgp.cn/wiki/view?pid=152