#include<stdio.h>
#define MAX 100
int Stack [MAX];
int top=-1;

void push(int value);
top=++top;
Stack[top]=value;

void sortStack();
for(int i=0;i<=top;i++)
{
    for(int j=1;j<=top;j++)
    {
        if(Stack[i]<Stack[j])
        {
            int temp=Stack[i];
            Stack[i]=Stack[j];
            Stack[j]=temp;
        }
    }
}
void printStack()
for(int i=0;i<=top;i++)
{
    printf("%d",stack[i]);
}
int main()
{
 push(5);
 push(3);
 push(8);
 push(1);
 sortStack();
 printStack();
 return 0;
}