0
0

No.14 演算子(足し算)

Last updated at Posted at 2024-07-24

演算子(足し算)

+(足し算) <出力結果> 30yen(まず10+20が行われてからyenが連結される)

-(引き算)
*(掛け算)
/(割り算)

演算子(余り)&練習問題

%(余り、4%2→4を2で割ったあまりを求める)

【練習問題】以下の手順に従いプログラムを作成しよう
practiceパッケージ内にPracitce03クラスを作成
int型のtotalという変数に10×3の結果を格納
変数totalを画面に表示
<出力例>
30
※解答例は、完成例のプロジェクトをご参照下さい
https://zenn.dev/codek2/books/63c880c460c21e/viewer/082a9e


まとめてご覧になりたいあなたは
https://zenn.dev/codek2/books/63c880c460c21e

詳しく学びたいあなたは
https://zenn.dev/codek2/articles/e9e44f3e0023fb

Youtube
https://youtube.com/@codek2_studio?feature=shared

Twitter
https://twitter.com/kunchan2_

Zenn
https://zenn.dev/codek2

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0