diff --git a/CalculatorFunctions/Multiply 2 decimal numbers b/CalculatorFunctions/Multiply 2 decimal numbers new file mode 100644 index 0000000..6fb5272 --- /dev/null +++ b/CalculatorFunctions/Multiply 2 decimal numbers @@ -0,0 +1,13 @@ +#include <stdio.h> +int main() { + double a, b, product; + printf("Enter two numbers: "); + scanf("%lf %lf", &a, &b); + + // Calculating product + product = a * b; + // Result up to 2 decimal point is displayed using %.2lf + printf("Product = %.2lf", product); + + return 0; +}