Home > Back-end >  The small white to solve
The small white to solve

Time:11-26

For this topic
# include & lt; Stdio. H>
# define N 10001
Int main () {
int i,j,temp;
[N] char a, b [N].

Gets (a);
Gets (b);
for(i=0; i!='\ n'; I++) {
Temp=1;
for(j=0; J!='\ n'; J++) {
If (a [I]==b [j]) {
Temp=0;
}
}
If (temp==1) {
Printf (" % c ", a [I]);
}
}
return 0;
}
With the
# include
# include
Int main () {
Char a, [10001].
Char b [10001];
Gets (a);
Gets (b);
Int ca=strlen (a);//get the length of the string a
Int cb=strlen (b);
for(int i=0; iInt pd=0;//if in one of the letters a, b, do remember to 0, behind judgment print useful
for(int j=0; j{
If (a [I]==b [j]) {
Pd=1;//if the same, down to 1, behind not print (do delete)
}
}
If (pd==0)//if the judgment of pd is 0, then print
{
Printf (" % c ", a [I]);
}

}
return 0;
} the two code to run different results? Why the first error and the second can submit show answer, to solve
  • Related