Java program codes
Pages
(Move to ...)
Home
▼
Friday, 9 September 2011
java even odd program
click on the image to enlarge
class Evenodd
{
public static void main(String args[])
{
int n = Integer.parseInt(args[0]);
if (n%2==0)
System.out.println( " Even Number"+n);
else
System.out.println(" odd Number"+n);
}
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment