Kartier Pohs

Tuesday, June 16, 2015

Arithmetic operators in Java


Arithmetic operators in Java
Arithmetic operators in Java
class ArithmeticOperators
{
 public static void main(String args[])
   {
     float a=10.5F,b=5.4F;
     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));
   }
}
  OUTPUT
Arithmetic operators in Java

No comments:

Post a Comment

Copyright 2015 @ Yogesh Prasad