public static void main(String[] args){ /* * 需求:给出一共64条数据,每页10条数据 * 计算:一共多少页 * * */ int totalCount=46; int pageSize=10; int i= totalCount%pageSize==0 ?totalCount/pageSize:totalCount/pageSize+1; int o= i-1>1?i-1:1; int v=5; int y= v+1<i?v+1:v; System.out.println(i); System.out.println(o); System.out.println(y); }
by: 发表于:2017-08-04 14:54:52 顶(0) | 踩(0) 回复
??
回复评论