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
0 comments:
Post a Comment