C Saved Program: serene-af

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


#include <stdio.h>

int main(void) {
	
    int array[]={10,20,30,10,20};
    int i,j,count=0;
    
    for(i=0;i<5;i++)
    {
        count=1;
        for(j=i+1;j<5;j++)
        {
            if(array[i]==array[j])
            {
                count=count+1;
            }
        }
        
        if(count==1)
        {
            printf("\n %d",array[i]);
        }
    }
	return 0;
}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs