Preview:
// Online C compiler to run C program online
#include <stdio.h>
#include <stdlib.h>

int main() {
    int arr[5]= {1,2,3,5,4};
    int i,j;
    int un=0;
    for(int i=0;i<5;i++)
    {
        printf("%d ",i);
        for(j=i+1;j<5;j++)
        {
            if(arr[i]==arr[j])
            {
                un=1;
                break;
            }
        }
        
    }
    if(un==1)
    {
        printf("the value is not unique:");
    }
    else
    {
        printf("the value is unique");
    }
    

    return 0;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter