Friday, 18 January 2013

2. Addition of two number


class Sum2
{
            public static void main(String args[ ])
            {
                        int a,b,c;
                        a=Integer.parseInt(args[0]);
                        b=Integer.parseInt(args[1]);
                        /*calculate the sum */
                        c=a+b;
                        System.out.println("Sum = "+c);
            }
}

No comments:

Post a Comment