--- tags: DICE C --- 4_4 印出資料 === > [name=CHAWTeam] [time=Feb 16, 2022] --- 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 上一篇:[4_3 身高與體重](https://hackmd.io/@CHAWTeam/DiceC-4_3) 下一篇:[5-1 四則運算](https://hackmd.io/@CHAWTeam/DiceC-5-1) --- 題目 --- ```! 寫一個程式,印出指定的學生資料如下: 姓名:Jack 身高:175公分 體重:68.5公斤 座右銘:Experience is the best teacher. 請使用int與float來儲存資料。 輸出範例: 姓名:Jack 身高:175公分 體重:68.5公斤 座右銘:Experience is the best teacher. ``` 程式碼 --- ```c= #include <stdio.h> int main() { int a=175; float b=68.5; printf("姓名:Jack\n身高:%d公分\n體重:%.1f公斤\n座右銘:Experience is the best teacher.",a,b); return 0; } ``` 輸出 --- ```! 姓名:Jack 身高:175公分 體重:68.5公斤 座右銘:Experience is the best teacher. ``` --- [查看我們在HackMD上的所有筆記](https://hackmd.io/@CHAWTeam) 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 上一篇:[4_3 身高與體重](https://hackmd.io/@CHAWTeam/DiceC-4_3) 下一篇:[5-1 四則運算](https://hackmd.io/@CHAWTeam/DiceC-5-1) --- {%hackmd Iiu5mOixR7yWkPHKCkabBg %} <iframe class="LikeCoin" height="235" src="https://button.like.co/in/embed/chawteam/button?referrer=https://hackmd.io/@CHAWTeam/DiceC-4_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