[](
#include <stdlib.h>
#include <stdio.h>
//SwapInt,交换x和y指向的内存地址的值
bool SwapInt(int* x, int* y);
//ThreeIntSort,输入的整数存放在x1,x2,x3指向的内存地址
//输出:要求x1,x2,x3地址中存放的整数是按照从小到大的顺序排好的
bool ThreeIntSort(int* x1, int* x2, int* x3);
//FourIntSort,输入的整数存放在x1,x2,x3,x4指向的内存地址
//输出:要求x1,x2,x3,x4地址中存放的整数是按照从小到大的顺序排好的
bool FourIntSort(int* x1, int* x2, int* x3, int* x4);
//ThreeIntSort,输入的整数存放在x1,x2,x3,x4,x5指向的内存地址
//输出:要求x1,x2,x3,x4,x5地址中存放的整数是按照从小到大的顺序排好的
bool FiveIntSort(int* x1, int* x2, int* x3, int* x4, int* x5);
int main()
{
int a,b,c,d,e;
//从命令行读入5个整数,放在a b c d e五个变量里
//补充实现代码
if( ThreeIntSort( /*补充实现代码*/))
printf("\n 前三个整数排序结果:%d %d %d\n", a, b, c, d);
if( FourIntSort(/*补充实现代码*/))
printf("\n 前四个整数排序结果:%d %d %d %d\n", a, b, c, d);
if( FiveIntSort(/*补充实现代码*/))
printf("\n 前五个整数排序结果:%d %d %d %d %d\n", a, b, c, d, e);
return 0;
)
```**_
bool ThreeIntSort(int* x1, int* x2, int* x3)
{
//补充实现代码
}
bool FourIntSort(int* x1, int* x2, int* x3, int* x4)
{
//补充实现代码
}
bool FiveIntSort(int* x1, int* x2, int* x3, int* x4, int* x5)
{
//补充实现代码
}
bool SwapInt(int* x, int* y)
{
//补充实现代码
}
```)
要求:
-1) 阅读 job1.cpp 代码,补充 job1.cpp 中缺少的代码实现程序目标
a) 补充读入 5 个整数的代码;
b) 补充三个排序函数的代码;
c) 补充 main 函数中调用三个排序函数的代码;
d) 补充 SwapInt 函数的代码;
2) 从命令行读入的 5 个整数存放在 5 个变量中,不能存放在数组中;
3) 在 ThreeIntSort、FourIntSort、FiveIntSort 的实现中,不能把数值放在数
组中进行排序,不能使用 C/C++标准库;
4) 不能使用全局变量;
5) SwapInt 函数可以实现后被三个排序函数使用,也可以不使用。