if input is abcdexyzbwqpoolj the output should be b.find first repeating character :   #include<stdio.h>
#include <stdlib.h>

    #include<string.h>
    int main()
    {
        int i,j;
    char str[1000];
    
    scanf("%s",str);//input the string
    for( i=0;i<strlen(str);i++)
    {
        for(j=i+1;j<strlen(str);j++)
        {
            if(str[i]==str[j])//compare
            {
                printf("%c",str[i]);
            }
        }
    }
    }

  This is printing all the repeating characters.Please correct this code


 

   

 