Advertisement
Alrarapie

Ganjil atau Genap

Sep 30th, 2021
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. public class Solution {
  5.  
  6.     public static void main(String[] args) {
  7.         /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
  8.         Scanner sc = new Scanner(System.in);
  9.         System.out.println(sc.nextInt()%2==0?"genap":"ganjil");
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement