I'm quite into games now, so how about we play In or Out! When a given number is even, the team scores so we shall print "In", but if it's not an even number, then we print "Out". Simple, right?
Now let's get this game started.
Input
A line containing an integer.
35
Output
A line containing a string.
Out
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println(in.nextInt() % 2 == 0 ? "In" : "Out");
}
}
Comments
Leave a comment