C语言:写一个程序,实现功能如下: 键盘上输入任意三个数(int类型),程序运行输出三个数中的最小值,三个数之和 限制要求:使用子函数的方式

C语言:写一个程序,实现功能如下:
键盘上输入任意三个数(int类型),程序运行输出三个数中的最小值,三个数之和
限制要求:使用子函数的方式

供参考:

#include <stdio.h>
void test()
{
    int a, b, c, sum, min;
    scanf("%d%d%d", &a, &b, &c);
    sum = a + b + c;
    if (a > b)
        min = b;
    else
        min = a;
    if (min > c)
        min = c;
    printf("min:%d,sum:%d", min, sum);
}
int main()
{
    test();
    return 0;
}