public class Sample3_2 { public static void main(String[] args) { int x, y, z; double res; boolean flag; x = 31982; y = 35; z = 457; res = ( x + y + z ) / 3; System.out.println("( " + x + " + " + y + " + " + z + ") / 3 = " + res + " だよ。"); res = ( x + y + z ) / 3.0; System.out.println("( " + x + " + " + y + " + " + z + ") / 3 = " + res + " だよ。"); flag = true; System.out.println(" 今日はいい天気だよね? ... " + flag + "!"); flag = false; System.out.println(" 今日の夕飯はフレンチのフルコースだね! ... " + flag + "!"); } }