以下是使用 C 语言实现上述功能的代码: ```c #include <stdio.h> // 输入函数 void input(int *a, int *b, int *c) { scanf("%d%d%d", a, b, c); } // 排序函数 void sort(int *a, int *b, int *c) { int temp; if (*a < *b) { temp = *a; *a = *b; *b = temp; } if (*a < *c) { temp = *a; *a = *c; *c = temp; } if (*b < *c) { temp = *b; *b = *c; *c = temp; } } int main() { int a, b, c; input(&a, &b, &c); sort(&a, &b, &c); printf("%3d%3d%3d\n", a, b, c); return 0; } ``` 在这个程序中,`input`函数用于输入三个整数,`sort`函数用于对三个整数进行从大到小的排序,`main`函数中调用这两个函数并输出排序后的结果。 [2024-10-22 22:07:27 | AI写代码神器 | 305点数解答]