C Programming Code Examples C > Functions Code Examples Program to multiply two numbers using function Program to multiply two numbers using function In this program we are creating a user defined function product() that multiplies the numbers that we are passing to it during function call. This function returns the product of these numbers. To understand this program you should have the knowledge of following C Programming concepts: #include <stdio.h> /* Creating a user defined function product that * multiplies the numbers that are passed as an argument * to this function. It returns the product of these numbers */ float product(float a, float b){ return a*b; } int main() { float number1, number2, prod; printf("Enter first Number: "); scanf("%f", &number1); printf("Enter second Number: "); scanf("%f", &number2); // Calling product function prod = product(number1, number2); // Displaying result up to 3 decimal places. printf("Product of entered numbers is:%.3f", prod); return 0; }