Input two numbers and the output is minimum one



#include "stdio.h"
double min(double x,  double y)


{
       if(x>y)
       return (y);
       else
       return (x);
}
int main (void)
{
    double a,b;
    printf("Enter two numbers:\n");
    scanf("%lf %lf", &a,&b);
    printf("The minimum number is %lf\n", min(a,b));
    system("pause");
    return 0;
}

0 comments:

Post a Comment