Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string s,t;
- cin >> s >> t;
- int a=0;
- cout << s << endl << t << endl;
- for (int i=0; i<t.size();i++){
- if(t[i]=s[a]){
- a++;
- cout << t[i] << ' ' << i << ' ' ;
- }
- }
- cout << a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement