Last active
October 11, 2024 14:37
-
-
Save yotamorimoto/2274025 to your computer and use it in GitHub Desktop.
プログラム実行
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| キーボードによるプログラムの実行方法は OS (macOS/Windows/Linux) によって違う | |
| macOS cmd + return | |
| Windows & Linux ctrl + return | |
| 下の行にカーソルを置き、実行する | |
| 1 + 2; | |
| ポストウィンドウに計算結果が出力される | |
| ;(セミコロン)はプログラム中の改行を表す | |
| 実践 | |
| プログラムを書き実行する | |
| 加減乗除の演算子(+、ー、*、/)と数字を組合わせ、計算をする | |
| 例 | |
| 1 + 1 / 2; | |
| 注:演算子に関わらす計算はいつも左から行われる | |
| 出力は 1 + 1 = 2 | |
| 2 / 2 = 1 | |
| 順序は () で変更 | |
| 1 + (1 / 2) = 1.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment