Thursday, June 23, 2016

SOLUTION OF URI 1180


//  1180    (Mahmud_Jamil) BRUR
//  Solution of 1180 Lowest Number and Position








#include <stdio.h>
int main()
{
   int a,b,c,d,e,N, p, min;
    scanf("%d", &N);
    int X[N];
    for(a=0; a<N; a++)
        scanf("%d", &X[a]);
    min=X[0];
    for(a=1; a<N; a++)
    {
        if(min>X[a])
        {
            min=X[a];
            p=a;
        }
    }
    printf("Menor valor: %d\nPosicao: %d\n", min, p);
    return 0;
}