--- tags: DICE C --- 5-4 溫度換算 === > [name=CHAWTeam] [time=Feb 16, 2022] --- 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 上一篇:[5-3 梯形面積](https://hackmd.io/@CHAWTeam/DiceC-5-3) 下一篇:[5-5 三次溫度換算](https://hackmd.io/@CHAWTeam/DiceC-5-5) --- 題目 --- ```! 寫一個程式,輸入攝氏溫度,輸出華氏溫度。 轉換公式:華氏溫度=(9/5)*攝氏溫度+32 (提示:請以小數點後1位的形式,表示華氏溫度) 輸入範例: 11.0 輸出範例: 華氏溫度為51.8 ``` ### 延伸 [溫度的故事](http://crazy.molerat.net/cmsb/crali/reading.php?filename=96082270417.dov) 程式碼 --- ```c= #include <stdio.h> int main() { float num; scanf("%f", &num); printf("華氏溫度為%.1f", (9.0/5.0)*num+32); return 0; } ``` 輸出 --- ```! 11.0 華氏溫度為51.8 ``` --- [查看我們在HackMD上的所有筆記](https://hackmd.io/@CHAWTeam) 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 上一篇:[5-3 梯形面積](https://hackmd.io/@CHAWTeam/DiceC-5-3) 下一篇:[5-5 三次溫度換算](https://hackmd.io/@CHAWTeam/DiceC-5-5) --- {%hackmd Iiu5mOixR7yWkPHKCkabBg %} <iframe class="LikeCoin" height="235" src="https://button.like.co/in/embed/chawteam/button?referrer=https://hackmd.io/@CHAWTeam/DiceC-5-4" 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