#include<stdio.h>
#define N 6
int main()
{
int a[N]={98,2,7,9,47,10};
int i,t,j;
for(i=0;i<N;i++)
for(j=i;j<N;j++)
if(a[i]>a[j])
{
t=a[i];
a[i]=a[j];
a[j]=t;
if(a[i]<a[i+1])
{
printf("%7d",a[i+1]);
goto out;
}
}
out:return 0;
}
#define N 6
int main()
{
int a[N]={98,2,7,9,47,10};
int i,t,j;
for(i=0;i<N;i++)
for(j=i;j<N;j++)
if(a[i]>a[j])
{
t=a[i];
a[i]=a[j];
a[j]=t;
if(a[i]<a[i+1])
{
printf("%7d",a[i+1]);
goto out;
}
}
out:return 0;
}