求余数

float qty=22;
float mult_iss=5;
float slt = (float) (qty - ( Math.floor(qty / mult_iss)* mult_iss)) ;

for(int j = 0; j < Math.floor(qty / mult_iss); j++){
System.out.println(Math.floor(qty / mult_iss)* mult_iss);
System.out.println(j);
}
if(slt > 0){
System.err.println(slt);
}

原文地址:https://www.cnblogs.com/yangpeng-jingjing/p/7462996.html