Write a function which receives a float and an int from main( ), finds the product of these two and returns the product which is printed through main( ).
void main()
{
float product(float,int);
float a,p;
int b;
printf("\nEnter the two values to find the product");
scanf("%f%d",&a,&b);
p=product(a,b);
printf("The product is %f",p);
}
float product(float i,int j)
{
float pr;
pr=i*j;
return(pr);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment