I want to write a program to add even number using command line argument.
class command { public static void main(String ar[]) { int a=0,b; for(int x=0;x<ar.length;x++) { b=Integer.parseInt(ar[x]); if(b%2==0) a=a+b; } System.out.println(a); } }
Username
Password
Remember Me
Lost your password?
Username or E-mail:
Log in