--- tags: DICE C --- 5-5 三次溫度換算 === > [name=CHAWTeam] [time=Feb 16, 2022] --- 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 上一篇:[5-4 溫度換算](https://hackmd.io/@CHAWTeam/DiceC-5-4) 下一篇:[5-6 時間計算](https://hackmd.io/@CHAWTeam/DiceC-5-6) --- 題目 --- ```! 寫一個程式,輸入攝氏溫度,輸出華氏溫度。 轉換公式:華氏溫度=(9.0/5.0)*攝氏溫度+32 (提示:請以小數點後1位的形式,表示華氏溫度) 輸入範例: 11.0 輸出範例: 華氏溫度為51.8 ``` ### 延伸 [溫度的故事](http://crazy.molerat.net/cmsb/crali/reading.php?filename=96082270417.dov) 程式碼 --- ```c= #include <stdio.h> int main() { float a, b, c; scanf("%f %f %f", &a, &b, &c); printf("1.華氏溫度為%.1f\n", (9.0/5.0)*a+32); printf("2.華氏溫度為%.1f\n", (9.0/5.0)*b+32); printf("3.華氏溫度為%.1f\n", (9.0/5.0)*c+32); return 0; } ``` 輸出 --- ```! 11.0 華氏溫度為51.8 ``` --- [查看我們在HackMD上的所有筆記](https://hackmd.io/@CHAWTeam) 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 上一篇:[5-4 溫度換算](https://hackmd.io/@CHAWTeam/DiceC-5-4) 下一篇:[5-6 時間計算](https://hackmd.io/@CHAWTeam/DiceC-5-6) --- {%hackmd Iiu5mOixR7yWkPHKCkabBg %} <iframe class="LikeCoin" height="235" src="https://button.like.co/in/embed/chawteam/button?referrer=https://hackmd.io/@CHAWTeam/DiceC-5-5" width="100%"></iframe> --- {%hackmd i1nMRrZcTFmTvoF897K9zg %}
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up