Showing posts with label Multiply two Floating Point Numbers in Java.. Show all posts
Showing posts with label Multiply two Floating Point Numbers in Java.. Show all posts

Tuesday, August 11, 2020

Write a Program to Multiply two Floating Point Numbers in Java.

Multiply two Floating Point Numbers

 

Multiply two Floating Point Numbers in Java.

Multiply Two floating point numbers in Java, store the result and display it on the our screen.


EXAMPLE :-

public class MTN {

public static void main(String[] args) {

float fst = 2.5f;
float sec = 2.0f;

float product = fst * sec;

System.out.println("The Product is :: " + product);
}
}



OUTPUT

The Product is :: 5.0