| Current Path : /var/www/html/venkat/old/ |
| Current File : /var/www/html/venkat/old/iim2015001_2.c |
#include<stdio.h>
#include<string.h>
void main()
{
int l1,l2,i,a1,a2,j;
char s1[100],s2[100],c[100],p[100];
scanf("%s",s1);
scanf("%s",s2);
l1=strlen(s1);
l2=strlen(s2);
if(l1>l2)
{
a1=l1;
a2=l2;
}
else
{
a1=l2;
a2=l1;
strcpy(c,s1);
strcpy(s1,s2);
strcpy(s2,c);
}
for(i=0;i<a1;i++)
for(j=0;j<a2;j++)
if(s1[i]==s2[j])
printf("%c",s1[i]);
}