Kodewick
学びはじめる →
基礎←→0 / 70

寒い?暑い?

#014基礎return "cold"約 4 分

天気カードにはひとことだけ表示します。10 度未満は "cold"、25 度以上は "hot"、その間は "mild" です。その言葉を返す weather_word(temp) を書きましょう。

例
weather_word(5)→'cold'
weather_word(18)→'mild'
weather_word(30)→'hot'
関数const char *weather_word(int temp)
main.c
const char *weather_word(int temp) {
    // ここにコードを書く:10 未満なら "cold"、25 以上なら "hot" を返す
    return "mild";
}
Ctrl + Enter でも実行できます
結果

実行すると例で試せます。よさそうなら提出しましょう。