A Program to Multiply Two Numbers

In this example, we are giving a program to multiply two given numbers which are given by the users.


Program to find the ASCII value:

  1. #include <stdio.h>
  2. int main()
  3. {
  4. double firstNumber, secondNumber, product;
  5. printf("Enter two numbers: ");
  6. // Stores two floating point numbers
  7. scanf("%lf %lf", &firstNumber, &secondNumber);
  8. // Stores the result of multiplication
  9. product = firstNumber * secondNumber;
  10. // Displays the result of multiplication
  11. printf("Product = %.2lf", product);
  12. return 0;
  13. }

Output:

Enter two numbers: 7.5
3.7
Product = 27.75