Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /*
- * Created by todor on 17.01.2017 г..
- */
- public class u03_EvenOrOdd {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int num = Integer.parseInt(scan.nextLine());
- boolean isEven = num % 2 == 0;
- if (isEven){
- System.out.println("even");
- }
- else {
- System.out.println("odd");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement