package com.wenshi.foreach;
import java.util.Scanner;
public class test1 {//创建类test1
public static void main(String args[]){//主方法
int x;//声明变量x
System.out.println("请输入x的值: ");
Scanner in = new Scanner(System.in); //Scanner类
// System.out.println("Please input a float number:");
x = in.nextInt(); //接收int数据
if (x%2==0) {
System.out.println("x是偶数呢");
} else {
System.out.println("x是奇数呢~");
}
}
}