/*-------------  宿題2 解答例 -------------*/ class rep2ans { public static void main(String[] args) { int yubin = 253, year = 1966, result; String address = "神奈川県茅ヶ崎市行谷1100"; System.out.println("文教大学の創立年は " + year + "年です.\n"); System.out.println("文教大学湘南校舎の住所は"); System.out.print(" 〒" + yubin + "-"); yubin = 8550; System.out.println(yubin + "\n " + address + "\nです."); yubin = 343; address = "埼玉県越谷市南荻島3337"; System.out.println("文教大学越谷校舎の住所は"); System.out.print(" 〒" + yubin + "-"); yubin = 8511; System.out.println(yubin + "\n " + address + "\nです."); result = yubin / year; System.out.print(" " + yubin + " / " + year + " = " + result + " 余り "); result = yubin % year; System.out.println(result); } }