--- tags: DICE C --- 2-1 測試系統 === > [name=CHAWTeam] [time=Jun, 2022] --- 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 下一篇:[2-2 SayHello](https://hackmd.io/@CHAWTeam/DiceC-2-2) --- 題目 --- ```! 寫一個程式,印出Hello, DICE! 輸入範例: 輸出範例: Hello, DICE! C範例程式: #include<stdio.h> int main() { printf("Hello, DICE!\n"); return 0; } C++範例程式: #include <iostream> using namespace std; int main() { cout<<"Hello, DICE!\n";/*cout 是輸出函式*/ return 0; } ``` 程式碼 --- ```cpp= #include <stdio.h> //前置處理:載入函式庫 int main() //定義主函數:回傳大括號內的程式 { printf("Hello, DICE!"); //使用 printf 函式印出「Hello, DICE!」 return 0; //正常結束程式 } ``` :::success 輸入與輸出後的括號內有加上`""`即為顯示的字串。 ::: 輸出 --- ```! Hello, DICE! ``` --- [查看我們在HackMD上的所有筆記](https://hackmd.io/@CHAWTeam) 目錄:[DICE C語言程式破解](https://hackmd.io/@CHAWTeam/DiceC) 下一篇:[2-2 SayHello](https://hackmd.io/@CHAWTeam/DiceC-2-2) --- {%hackmd Iiu5mOixR7yWkPHKCkabBg %} <iframe class="LikeCoin" height="235" src="https://button.like.co/in/embed/chawteam/button?referrer=https://hackmd.io/@CHAWTeam/DiceC-2-1" 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