Given two floating numbers A and B. The task is to write a program to find the product of these two numbers.

**Examples**:

Input: A = 2.12, B = 3.88

Output: 8.225600

Input: A = 3.78, B = 6.32

Output: 23.889601

In the below program to multiply two floating point numbers, the user is first asked to enter two floating numbers and the input is scanned using the scanf() function and stored in the variables and . Then, the variables and are multiplied using the arithmetic operator and the product is stored in the variable **product**.

Below is the C program to multiply two floating point numbers:

`// C program to multiply two floating point numbers ` `#include <stdio.h> ` ` ` `int` `main() ` `{ ` ` ` `float` `A, B, product = 0.0f; ` ` ` ` ` `// Ask user to enter the two numbers ` ` ` `printf` `(` `"Enter two floating numbers A and B : \n"` `); ` ` ` ` ` `// Read two numbers from the user || A = 2.12, B = 3.88 ` ` ` `scanf` `(` `"%f%f"` `, &A, &B); ` ` ` ` ` `// Calclulate the multiplication of A and B ` ` ` `// using '*' operator ` ` ` `product = A * B; ` ` ` ` ` `// Print the product ` ` ` `printf` `(` `"Product of A and B is: %f"` `, product); ` ` ` ` ` `return` `0; ` `} ` |

*chevron_right*

*filter_none*

**Output:**

Enter two floating numbers A and B : 2.12 3.88 Product of A and B is: 8.225600

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- Rounding Floating Point Number To two Decimal Places in C and C++
- Write a one line C function to round floating point numbers
- Precision of floating point numbers in C++ (floor(), ceil(), trunc(), round() and setprecision())
- Problem in comparing Floating point numbers and how to compare them correctly?
- Program for conversion of 32 Bits Single Precision IEEE 754 Floating Point Representation
- How to count set bits in a floating point number in C?
- Convert a floating point number to string in C
- Floating Point Operations & Associativity in C, C++ and Java
- Check whether given floating point number is even or odd
- Why floating-point values do not represent exact value
- Program to multiply two Matrix by taking data from user
- Java Program to Multiply two Matrices of any size
- Program to multiply two matrices
- Reflection of a point at 180 degree rotation of another point
- sizeof() for Floating Constant in C
- Program to find the mid-point of a line
- C Program for Number of jump required of given length to reach a point of form (d, 0) from origin in 2D plane
- Program to find the Break Even Point
- C Program to Swap two Numbers
- Program to find GCD or HCF of two numbers

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.