Skip to content

Commit a05d9bd

Browse files
authored
Multiply Two Floating-Point Numbers
In this program, you'll learn to multiply two floating point numbers in Java, store the result and display it on the screen.
1 parent 7f1df0c commit a05d9bd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public class MultiplyTwoNumbers {
2+
3+
public static void main(String[] args) {
4+
5+
float first = 1.5f;
6+
float second = 2.0f;
7+
8+
float product = first * second;
9+
10+
System.out.println("The product is: " + product);
11+
}
12+
}

0 commit comments

Comments
 (0)