Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- string diff(string a ,string b){
- string Ans = "";
- for(int i=0 ; i<a.size() ; i++){
- bool flag = true;
- for(int j=0 ; j<b.size() ; j++){
- if( a[i] == b[j] ){
- flag = false;
- break;
- }
- }
- if( flag == true ){
- Ans += a[i];
- } else {
- // No Thing
- }
- }
- return Ans;
- }
- int main()
- {
- string a ,b;
- cin >> a >> b;
- string c = diff(a ,b);
- cout << c << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement