Back To C User Defined Functions Index
//program to create a function that inputs two numbers and finds their product #include
#include
void product(int,int); void product(int a,int b) { int prod; prod=a*b; printf("product of two numbers is %d",prod); } void main() { int a,b; clrscr(); printf("enter value for a"); scanf("%d",&a); printf("enter value for b"); scanf("%d",&b); product(a,b); getch(); }