question2です

This commit is contained in:
2026-09-11 14:46:47 +09:00
parent 3567253ef0
commit cdbed31d0c
8 changed files with 18 additions and 15 deletions

View File

@@ -9,7 +9,9 @@ public class PTra02_06 {
public static void main(String[] args) {
// 以下のプログラムを実行すると割り算の結果の小数点以下が切り捨てられてしまいます。
// TODO 切り捨てられないように修正してください。
System.out.println(9/2);
double a = 9;
double b = 2;
System.out.println(a/b);
}