求助:运用函数求排序问题
题目:输入四个整数,使之由大到小输出(运用函数)。我的代码:
#include "stdio.h"
void main()
{
int a,b,c,d,h[3],i,j,k;
printf("Please input the a,b and c:\n");
scanf("%d%d%d%d",&a,&b,&c,&d);
h[3]=bj(bj(bj(a,b),c),d);
printf("%d%d%d%d",h[0],h[1],h[2],h[3]);
}
int bj(int x,int y)
{
int z;
if(x<y)
{z=x;x=y;y=z;}
return z;
}
虽然能成功编译,但输出为随机数字,请问错在哪里?

泾溪石险人竞慎,终岁不闻倾覆人。却是平流无石处,时时闻说有沉论。