Computer Program Technology
Friday, 14 September 2012
Java program codes: 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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment