【发布时间】:2014-01-02 09:44:47
【问题描述】:
public class Triangle {
public static void main(String[] args) {
int n=12345, x=15;
int res =(n % x);
System.out.println(res);
}
}
声明int res = (n%x) 是0。为什么?
【问题讨论】:
-
提示:
12345 = 823*15+0 -
1) 请不要忘记添加“?”提问!有些人在页面中搜索“?”如果“问题”中不存在,则直接转到下一个(实际)问题。 2) 请对代码、输入/输出和结构化文档(如 HTML 或 XML)使用代码格式。为此,请选择示例并单击消息发布/编辑表单上方的
{}按钮。 -
您的问题到底是什么?...您得到了正确答案 (0)..