变量定义:
- total:总记录数
- size:每页记录数
- result:分页总页码
算法代码:
result=(total-1)/size+1
常用方法:
result=math.ceiling(total/size)
通俗方法:
result=total/size;
if(total%size!=0)result++;
变量定义:
算法代码:
result=(total-1)/size+1
常用方法:
result=math.ceiling(total/size)
通俗方法:
result=total/size;
if(total%size!=0)result++;