this a simple program to compare two numbers, but it cannot display the correct result, what I got is always "0.00". why?
Code:#include<stdio.h> double small(double x,double y); int main(void) { double x,y; printf("ple enter number"); scanf("%f %f",&x,&y); printf("the smaller number is %.2f", small(x,y)); system("pause"); return 0; } double small(double x,double y) { if(x<=y) return x; else return y; }