| Current Path : /var/www/html/venkat/old/ |
| Current File : /var/www/html/venkat/old/bim2015006_5.c |
#include<stdio.h>
#include<string.h>
int main()
{
char a[100],b[100],l[100],s[100];
scanf("%s %s",a,b);
if(strlen(a)>strlen(b))
{
strcpy(s,b);
strcpy(l,a);
}
else
{
strcpy(s,a);
strcpy(l,b);
}
int i,j;
for(i=0;s[i]!='\0';i++)
for(j=0;l[j]!='\0';j++)
{
if(l[j]!='\0')
{if(s[i]==l[j])
{
putchar(s[i]);
l[j]='-';
break;
}
}
}
return 0;
}