函数返回3个整数

时间:2019-03-18 20:32:10

标签: c function

如何创建返回3个整数的函数? (我想创建一个功能,将数字从最高到最低排序)

int sort(int a, int b, int c)
{
    int max1, max2, max3, temp;
    char Values[40];
    max1 = a;
    max2 = b;
    max3 = c;
    if (max3>max2)
    {
        temp = max2;
        max2 = max3;
        max3 = temp;
    }
    if (max2>max1)
    {
        temp = max1;
        max1 = max2;
        max2 = temp;
    }
   //Here I don't know how to proceed further
}

0 个答案:

没有答案