The program and results are shown in the figure. Please note that scanf_s is replaced by scanf. I'm here because my c++ environment has no other settings.
void sort(int a[],int n)
{
Internal temperature;
for(int I = 0; I<n-1; i++)
for(int j = 0; j & ltn-I; j++)
if(a[j]& lt; a[j + 1])
{
temp = a[j];
a[j]= a[j+ 1];
a[j+ 1]= temp;
}
}
int main() {
int a[5];
for(int I = 0; I<5; i++)
scanf_s("%d ",& ampa[I]);
sort(a,5);
Printf ("second maximum =%d", a [1]);
}