--- tags: DICE C --- 4-5 長方形 === > [name=CHAWTeam] [time=Feb 16, 2022] --- 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 上一篇:[4-4 3個浮點數](https://hackmd.io/@CHAWTeam/DiceC-4-4) 下一篇:[4-6 自主學習](https://hackmd.io/@CHAWTeam/DiceC-4-6) --- 題目 --- ```! 寫一個程式,輸入長方形的長與寬,然後分別印出它的四邊邊長。 提示:請按照輸入的順序,以及「一筆畫畫完周長」的順序輸出。 輸入範例: 5 2 輸出範例: 5 2 5 2 ``` 程式碼 --- ```c= #include <stdio.h> int main() { int a, b; scanf("%d\n%d", &a, &b); printf("%d %d %d %d", a, b, a, b); return 0; } ``` 輸出 --- ```! 5 2 5 2 5 2 ``` --- [查看我們在HackMD上的所有筆記](https://hackmd.io/@CHAWTeam) 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 上一篇:[4-4 3個浮點數](https://hackmd.io/@CHAWTeam/DiceC-4-4) 下一篇:[4-6 自主學習](https://hackmd.io/@CHAWTeam/DiceC-4-6) --- {%hackmd Iiu5mOixR7yWkPHKCkabBg %} <iframe class="LikeCoin" height="235" src="https://button.like.co/in/embed/chawteam/button?referrer=https://hackmd.io/@CHAWTeam/DiceC-4-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