#include <stdio.h>
#include <limits.h>
#include <stdarg.h>
int minimo(int args, ...)
{
int elemento, min = INT_MAX;
va_list valist;
for(int i=0; i<args; i++)
{
elemento
= va_arg(valist
, int); if(elemento < min)
min = elemento;
}
return min;
}
int main()
{
int num = minimo(8, 5, 3, 7, 12, 6);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxsaW1pdHMuaD4KI2luY2x1ZGUgPHN0ZGFyZy5oPgoKaW50IG1pbmltbyhpbnQgYXJncywgLi4uKSAKewogICAJaW50IGVsZW1lbnRvLCBtaW4gPSBJTlRfTUFYOwoKICAgIHZhX2xpc3QgdmFsaXN0OwogICAgdmFfc3RhcnQodmFsaXN0LCBhcmdzKTsKICAgICAKICAgIGZvcihpbnQgaT0wOyBpPGFyZ3M7IGkrKykKICAgIHsKICAgICAgICBlbGVtZW50byA9IHZhX2FyZyh2YWxpc3QsIGludCk7CiAgICAgICAgaWYoZWxlbWVudG8gPCBtaW4pCiAgICAgICAgICAgIG1pbiA9IGVsZW1lbnRvOwogICAgfQogICAgCiAgICB2YV9lbmQodmFsaXN0KTsKCiAJIHJldHVybiBtaW47Cn0KCmludCBtYWluKCkgCnsgICAKCQoJaW50IG51bSA9IG1pbmltbyg4LCA1LCAzLCA3LCAxMiwgNik7CglwcmludGYoIiVkXG4iLCBudW0pOwoKICAgIHJldHVybiAwOwp9Cg==