public class HelloWorld {
public static void main(String[] args) {
int m = 5;
int n = 7;
int x = ( m * 8 / ( n + 2 ) ) % m ;
System.out.println("m:" + m);
System.out.println("n:" + n);
System.out.println("x:" + x);
}
}
(m * 8 / ( n + 2 ) 这部分等于4,然后4除以5,商为0,余数为4本身。所以4对5求余等于4