//This small prorgam removes all duplicated characters out of a string
//Author dcc0@yandex.ru. 2018
#include <stdio.h>

 int
main (int argc, char *argv[])
{
  
//here we check arguments
    
 
//it calculates an array's length
  int x;
  
char a[] = "rentgenoehlektrokardiograficheskogo";
  
for (x = 0; a[x] != '\0'; x++);
  printf ("Original lengh: %d\n", x-1);
 
 
 
//vars for cycles
  int i;
  
int j;
  
int z;
  
z = x + 1;
  
 
//here we search twins
    for (i = 0; i != z; i++)
    {
      
j = i + 1;
      
while (j != z)
	{
	  
if (a[i] == a[j])
	    {
	      
a[i] = '.';
	    
}
	  
j++;
	
}
    
}
  
 
//here we count x to set a length of  array c
    x = 0;
  
for (i = 0; i != z; i++)
    {
      
if (a[i] != '.')
	{
	  
x++;
	
}
    
}
  
//here we write chars to c
  char c[x];
  
j = 0;
  
for (i = 0; i != z; i++)
    {
      
if (a[i] != '.')
	{
	  
c[j] = a[i];
	  
j++;
	
}
    
}
  
//here we print a result in array c
    c[j] = '\n';
  
printf ("%s\n", c);
printf ("Number of uniqe symbols: %d\n", j-1);


}


