1.How to subtract two float values in java.
public class SubtractFloatVaues
{
public static void main(String args[])
{
float a=20.54f,b=50.732f,c;
c=b-a;
System.out.println("c="+c);
}
}
OUTPUT:
c=30.191998
public class SubtractFloatVaues
{
public static void main(String args[])
{
float a=20.54f,b=50.732f,c;
c=b-a;
System.out.println("c="+c);
}
}
OUTPUT:
c=30.191998
thanks
ReplyDelete