import java.util.Scanner; public class helloworld { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("输入行数"); int rows = .nextInt(); int size = 10; int pages; if (rows % size == 0) { pages = rows / size; } else { pages = rows / size + 1; } System.out.println(pages); } }
相关分类