package com.swift; import java.util.Random; import java.util.Scanner; public class GuessBigSmall { public static void main(String[] args) { Scanner scan=new Scanner(System.in); Random random = new Random(); int number = random.nextInt(1000) + 1; for…
要求: 输入一个5位数,判断它是不是回文数.即12321是回文数,个位与万位相同,十位与千位相同. 实现代码: package kaoshi; import java.util.Scanner; public class palindrome { public static void main(String[] args) { System.out.println("请输入一个5位数:"); Scanner sc = new Scanner(System.in); int num =…