Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package oddeven;
- import java.util.Scanner;
- /**
- *
- * @author MPA3
- */
- public class Oddeven {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- System.out.println("Enter A Number");
- int num = input.nextInt();
- if(num % 2 == 0){
- System.out.println("This is Even Number");
- }else {
- System.out.println("This is Odd Number");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement