fork download
  1. #include <stdio.h>
  2. #include <stdbool.h>
  3. // WAP TO FIND UNIQUE ELEMENT WHICH IS NOT REPEATING
  4. int main(void) {
  5. int arr[7]={1,3,2,6,6,2,3};
  6.  
  7. for(int i=0;i<7;i++){
  8. bool check=false;
  9. for(int j=i+1;j<7;j++){
  10. if(arr[i]==arr[j]){
  11. check=true;
  12. }
  13. }
  14. if(check==false){
  15. printf("%d",arr[i]);
  16. break;
  17. }
  18. }
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
1