One possible method would be:
1. create an array (say s) and populate it with lower case alphabet (a to z)
2. create a second array and initialize it with the string holding the duplicates.
3. with two nested loops compare s[0] with s1[0] -> s1[end] and count the number of s[0]`s in s1[].
4. if there is < 1 or > 1 instances of s[0] in s1[] type char(32) into s[0] otherwise do nothing.
5.zero the count and repeat for s[1] which holds 'b'
6.repeat until 'z' is reached.
7.print out the characters that are not spaces in the s[] array.
what follows provides an example of how the nested loops finds which lower case letters are not duplicated in the s1[]array.
- for(int i=0;i<27;i++)
-
{count=0;
-
for(int j=0;j<len;j++)
-
if(s[j]==s1[i])count++;
-
for(int j=0;j<len;j++)
-
if(count<1||count>1)s1[i]= char(32);
-