假设有整型变量x,判断x是否为偶数,若为偶数,则在控制台上打印“输入的数值是偶数”。无论x是否为偶数,最后都要在控制台上输出x的值_python 假设有整形变量x-CSDN博客网友收藏

假设有整型变量x,判断x是否为偶数,若为偶数,则在控制台上打印“输入的数值是偶数”。无论x是否为偶数,最后都要在控制台上输出x的值_python 假设有整形变量x-CSDN博客

文章浏览阅读957次。import java.util.Scanner;public class test{ public static void main(String[] args) { System.out.println("请输入一个数字:"); Scanner sc=new Scanner(System.in); int x= sc.nextInt(); if (x%2==0){ System.out.println(......
阅读全文