#include<stdio.h>
void main()
{
int a,b,c;
int m;
printf("输入三个数:\n");
scanf("%d%d%d",&a,&b,&c);
if(a>=b&&a>=c)
{
printf("%d ",a);
if(b>=c)
{
printf("%d ",b);
printf("%d ",c);
}
else
{
printf("%d ",c);
printf("%d ",b);
}
}
if(b>=a&&b>=c)
{
printf("%d ",b);
if(a>=c)
{
printf("%d ",a);
printf("%d ",c);
}
else
{
printf("%d ",c);
printf("%d ",a);
}
}
if(c>=a&&c>=b)
{
printf("%d ",c);
if(a>=b)
{
printf("%d ",a);
printf("%d ",b);
}
else
{
printf("%d ",b);
printf("%d ",a);
}
}
}
兄弟也是菜鸟 琢磨了以下
Private Sub Form_click()
Const N = 3
Dim a(1 To N), i%
For i = 1 To N
a(i) = Val(InputBox("请输入数字", "数据输入框"))
Print a(i);
Next i
Print
For i = 1 To N - 1
k = i
For j = i + 1 To N
If a(j) > a(k) Then k = j
Next j
t = a(i): a(i) = a(k): a(k) = t
Next i
For i = 1 To N
Print a(i);
Next i
End Sub
这个程序 兄弟丢人了 但是也是刚开始学 希望大家支持。