④ Java Tutor のエディタで次のプログラムを入れ,
実行し,結果を確認する
19
結果の
「6.25」を確認
「Visual Execution」をクリック.そして「Last」をクリック.結果を確認.
「Edit this code」をクリックすると,エディタの画面に戻る
底辺が2.5で,高さが5のとき,
三角形の面積は,面積: 6.25
public class YourClassNameHere {
public static void main(String[] args) {
double teihen = 2.5;
double takasa = 5;
System.out.println(teihen * takasa / 2);
}
}