特牛网址导航

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

网友收藏
  • 链接地址:https://blog.csdn.net/weixin_57239983/article/details/123947342
  • 链接标题:假设有整型变量x,判断x是否为偶数,若为偶数,则在控制台上打印“输入的数值是偶数”。无论x是否为偶数,最后都要在控制台上输出x的值_python 假设有整形变量x-CSDN博客
  • 所属网站:blog.csdn.net
  • 被收藏次数:5022
文章浏览阅读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(._python 假设有整形变量x