package day04;java
import java.util.Scanner;ide
/**spa
* 條件運算符orm
* 根據查詢結果數量和每頁顯示數量,計算顯示頁數。it
*/io
public class Demo01 {console
public static void main(String[] args) {class
Scanner console = new Scanner(System.in);import
System.out.print("輸入查詢行數:");im
int rows = console.nextInt();//查詢結果數量,行數 66
int size = 10;//頁面大小,就是每一個頁面顯示的行數 10
int pages;//顯示頁數
pages = rows%size==0?rows/size:rows/size+1;
System.out.println("查詢結果頁數:"+pages);
}
}