#include<stdio.h>
int main(void)
{
char str[10]={'\0'};
char *ch;
int i;
static unsigned short letter[26]={0};
printf("input a string :");
scanf("%s",str);
ch=str;
while(*ch!='\0')
{
if(letter[*ch-'a']==0)
{
letter[*ch-'a']=1;
}
else
*ch='\0';
ch++;
}
for(i=0;i<10;i++)
if(str[i]!='\0')
putchar(str[i]);
putchar('\n');
getchar();
return 0;
}
int main(void)
{
char str[10]={'\0'};
char *ch;
int i;
static unsigned short letter[26]={0};
printf("input a string :");
scanf("%s",str);
ch=str;
while(*ch!='\0')
{
if(letter[*ch-'a']==0)
{
letter[*ch-'a']=1;
}
else
*ch='\0';
ch++;
}
for(i=0;i<10;i++)
if(str[i]!='\0')
putchar(str[i]);
putchar('\n');
getchar();
return 0;
}