The output I get from this program just shows all zeros, I cant figure out what is wrong as this is how the scanf and printf statements are formatted in the book. Any help please?
Code:
#include <stdio.h>
double min(double, double);
int main(void)
{
double first, second, displaylow;
printf("Please enter 2 floating point numbers: ");
scanf("%f %f", &first, &second);
displaylow = min(first, second);
printf("%f is the lower of the floats entered", displaylow);
return 0;
}
double min(double one, double two)
{
if (one > two)
return two;
else
return one;
}