#include <stdio.h>
#include <stdarg.h>
#include <float.h>

double max(int count, ...)
{
    double max = -DBL_MAX, test;

    va_list values;
    va_start(values, count);https://i...content-available-to-author-only...e.com/OfpjUi#
    for(int i = 0; i < count; ++i)
    {
        test = va_arg(values, double);
        if(test > max)
        {
            max = test;
        }
    }
    va_end(values);
    return max;
}

int main()
{
    printf("%lf", max(5,1.0,6.0,-31.0,23.0,24.0));
    return 0;
}