MCPcopy Create free account
hub / github.com/Hazrat-Ali9/Computer-Programming / Problem12

Class Problem12

Problem12.java:5–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import java.util.Scanner;
4
5public class Problem12 {
6
7 public static void main(String[] args) {
8 // TODO Auto-generated method stub
9
10 Scanner input = new Scanner(System.in);
11 int T = input.nextInt();
12
13 for (int i = 0; i < T; i++) {
14 int n = input.nextInt();
15 System.out.println(evenodd(n));
16 }
17 input.close();
18
19 }
20
21 public static String evenodd(int n) {
22 String result = "";
23 if (n % 2 == 0) {
24 result = "even";
25 } else if (n % 2 != 0) {
26 result = "odd";
27 }
28 return result;
29 }
30
31}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected