In this program, client is requested to enter two numbers (drifting point numbers). At that point, the result of those two numbers is put away in a variable and showed on the screen.
To comprehend this model, you ought to have the learning of following C programming themes:
C Programming Constants and Variables
C Programming Data Types
C Input Output (I/O)
C Programming Operators
Program to Multiply Two Numbers
twofold firstNumber, secondNumber, item;
printf("Enter two numbers: ");
/Stores two skimming point numbers in factor firstNumber and secondNumber individually
scanf("%lf %lf", &firstNumber, &secondNumber);
/Performs augmentation and stores the outcome in factor productOfTwoNumbers
item = firstNumber * secondNumber;
/Result up to 2 decimal point is shown utilizing %.2lf
printf("Product = %.2lf", item);
Enter two numbers: 2.4
Item = 2.69
In this program, client is requested to enter two numbers. These two numbers entered by the client is put away in factor firstNumber and secondNumber individually. This is finished utilizing scanf() work.
At that point, the result of firstNumber and secondNumber is assessed and the outcome is put away in factor productOfTwoNumbers.
At last, the productOfTwoNumbers is shown on the screen utilizing printf() work.
Notice that, the outcome is round to second decimal place utilizing %.2lf transformation character.
Look at these related models:
Swap Two Numbers
Make a Simple Calculator Using switch...case
Include Two Integers
Show Prime Numbers Between Intervals Using Function
Discover GCD of two Numbers
Discover LCM of two Numbers
Ascertain the Sum of Natural Numbers
Include Two Complex Numbers by Passing Structure to a Function