U2p2.java

import java.util.*; public class u2p2 { public static void main(String []args) { int num; Scanner sc=new Scanner(System.in); System.out.println("Enter a number"); num=sc.nextInt(); if(num%2==0) { System.out.println("Even number"); } else { System.out.println("Odd number"); } } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.