Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include<iostream>
  2. #include<string.h>
  3. using namespace std;
  4. int main()
  5. {int i,j=0,ok=0;
  6. char a[30],b[30];
  7. cin>>a>>b;
  8. for(i=0;i<strlen(b);i++)
  9. {if(b[i]==a[j])
  10. {ok++;
  11. j++;}}
  12. if(ok==strlen(a))
  13. cout<<"DA";
  14. else
  15. cout<<"NU";}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement