Hello JR,
Yes, the use of the float is the current problem. However, since you commence with int data, and return an int, it should be possible to avoid using float within your function. This will greatly improve the efficiency of your code.
The following calculation should maintain unsigned int precision, with a calculated value between 0 and 100.
tempc = tempa * tempb / 100;
Alternatively, i would think you could simply write the contents of the function as -
unsigned int prod (unsigned int *a,unsigned int *b)
{
return ((*a) * (*b) / 100);
}
Regards,
Mac