I need to make an algorithm that the user informs two values and return the largest between them using double, but at the time of compiling it from the error pointing something in the double but I do not know how to solve, someone can help me and explain me how I would use correctly ?
#include <stdio.h>
double maior(double *x, double *y)
{
double maior;
if (*x>*y)
{
maior=*x;
return maior;
}
else
{
maior=*y;
}
return maior;
}
int main()
{
double x,y,m;
printf("Informe dois valores com espaco entre eles:");
scanf("%f %f",&x,&y);
m=maior(&x,&y);
printf("O maior eh: %f \n",m);
return 0;
}