[Plain] Description
Enter a string str and a filter string s (representing a filter table) to filter out all characters from the filter table in str.
Input
There are two rows of input data, the first row of str, the second row of s, and the string cannot exceed 70 characters.
Output
Output the filtered string.
Sample Input
Asf $ a sf $
$
Sample Output
Sf
Description
Enter a string str and a filter string s (representing a filter table) to filter out all characters from the filter table in str.
Input
There are two rows of input data, the first row of str, the second row of s, and the string cannot exceed 70 characters.
Output
Output the filtered string.
Sample Input
Asf $ a sf $
$
Sample Output
Sf
[Plain] # include <stdio. h>
# Include <string. h>
Int main ()
{
Int I;
Int j;
Int l;
Int n;
Int m;
Char a [70];
Char B [70];
Char c [70];
Gets ();
Gets (B );
N = strlen ();
M = strlen (B );
For (I = 0; I <m; I ++)
{
L = 0;
For (j = 0; j <n; j ++)
{
If (a [j]! = B [I])
{
C [l ++] = a [j];
}
}
C [l] = 0;
For (j = 0; j <l; j ++)
{
A [j] = c [j];
}
N = l;
A [j] = 0;
}
For (I = 0; c [I]; I ++)
{
Printf ("% c", c [I]);
}
Return 0;
}
# Include <stdio. h>
# Include <string. h>
Int main ()
{
Int I;
Int j;
Int l;
Int n;
Int m;
Char a [70];
Char B [70];
Char c [70];
Gets ();
Gets (B );
N = strlen ();
M = strlen (B );
For (I = 0; I <m; I ++)
{
L = 0;
For (j = 0; j <n; j ++)
{
If (a [j]! = B [I])
{
C [l ++] = a [j];
}
}
C [l] = 0;
For (j = 0; j <l; j ++)
{
A [j] = c [j];
}
N = l;
A [j] = 0;
}
For (I = 0; c [I]; I ++)
{
Printf ("% c", c [I]);
}
Return 0;
}