[問題] (参照:http://www.cc.kyoto-su.ac.jp/~mmina/bp1/hundredKnocksBasic.html)
15000を7で割った余りを表示するプログラムを作成しなさい。
コード
public class Main {
public static void main(String[] args) throws Exception {
System.out.println(15000 % 7);
}
}
結果
6
★ a % b =aをbで割った余り