Please Help Me!

using namespace std;
#include<string.h>
#include
int main() {
int count =0;
char k[100];
cin>>k;
char s[100];
cin>>s;

for(int j=0;j<strlen(s);j++){
for(int i=0;i<strlen(k);i++){
if(‘s[j]’==‘k[i]’){
count=count +1;
break;
}
}

}
cout <<count;

return 0;

}

Please either format your code or link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

Also, please provide the input you are using to test with.

Edit:

He solved it: CodeChef: Practical coding for everyone

1 Like