Problem Statement
AtCoDeer the deer found two positive integers, a andb. Determine whether the product ofa andb is even or odd.
Constraints
- 1≤a,b≤10000
- a andb are integers.
Input
Input is given from Standard Input in the following format:a b
Output
If the product is odd, print Odd
; if it is even, printEven
.
代码:运行环境MyEclipse
package com.niit.lanqiao01;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
int a,b,num;
Scanner scan=new Scanner(System.in);
a=scan.nextInt();
b=scan.nextInt();
num=a*b;
if(num%2==0){
System.out.println("even");
}
else{
System.out.println("odd");
}
}
}