rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Solution 11462 : Age Sort

Welcome Note

Hi,
I'm Anisuzzaman Babla . I am a full stack Android Application Developer. I am working with Android for more than two years. I have completed my graduation from IIT, Jahangirnagar University. I have developed a series of commercially successful apps on Android. Moreover, 10+ of my Apps are live at Google play store. .
Thank You

UVa Solution 11462 : Age Sort

#include<algorithm>
#include<stdio.h>
using namespace std;
long int a[2000005],i,n;
int main()
{
    while (scanf("%ld",&n)!=EOF)
    {
        if (n==0)
        {
            break;
        }
        for (i=0;i<n;i++)
        {
            scanf("%ld",&a[i]);
        }
        sort(a,a+n);
        for (i=0;i<n;i++)
        {
            printf("%ld",a[i]);
            if (i<(n-1))
                printf(" ");
        }
        printf("\n");
    }
    return 0;
}