Your Ad Here
Showing posts with label Program to explain the concept of Arithmetic Operators in java. Show all posts
Showing posts with label Program to explain the concept of Arithmetic Operators in java. Show all posts

Friday, 6 January 2012

Write a Program to explain the concept of Arithmetic Operators in java


class arithemetic
{
            public static void main(String args[])
            {
                        float a=12, b=2;
                        System.out.println("a= " +a);
                        System.out.println("b= " +b);
                        System.out.println("a+b= " +(a+b));
                        System.out.println("a-b= " +(a-b));
                        System.out.println("a*b= " +(a*b));
                        System.out.println("a/b= " +(a/b));
                        System.out.println("a%b= " +(a%b));
            }
}