I'm new to C programming, but not to programming. Can anyone see why this code isn't working? It seems to be the simplest program in the world, but it always returns a product of 0.00000. If anyone can spot what I'm doing wrong, please reply.
Thank you.
tzuch
Code:
#include <stdio.h>
float x,y, prod;
float fmu(float a, float b);
main()
{
puts("Enter two floats to multiply");
scanf("%f %f", &x,&y);
prod=fmu(x,y);
prfloatf("\nThe following is the product...%f", &prod);
puts("\n\n\nEnter a single digit to exit");
scanf("%d", &x);
return 0;
}
float fmu(float a, float b)
{
return (a*b);
}