Write a  Java Program to Multiply two Floating Point Numbers

Java Program to Multiply two Floating Point Numbers

Welcome to the World of Online Learning:

Hello Friends “This blog helps you to learn Java programming concepts. You can learn Java  language at your own speed and time. One can learn concepts of Java language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

Java Program to Multiply two Floating Point Numbers
Java Program to Multiply two Floating Point Numbers

Write a  Java Program to Multiply two Floating Point Numbers

PROGRAM: Java Program to Multiply two Floating Point Numbers

/* Java Program to Multiply two Floating Point Numbers */

public class MultiplyTwoNumbers {

public static void main(String[] args) {

float first = 2.5f;
float second = 2.0f;

float product = first * second;

System.out.println(“The product is: ” + product);
}
}

OUTPUT:- The product is 4.0

 

Leave a Reply

Your email address will not be published. Required fields are marked *