hungkt1997

ktlt-lab8.3

May 19th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3. #include<stdio.h>
  4.  
  5. using namespace std;
  6. int main() {
  7. int a1, a2;
  8. char s1[20], s2[20];
  9. cout << "nhap chuoi hien tai =" << endl;
  10. cin >> s1;
  11. cout << "nhap chuoi con =" << endl;
  12. cin >> s2;
  13. cout << strlen(s1) - strlen(strstr(s1, s2));
  14. system("pause");
  15. }
Advertisement
Add Comment
Please, Sign In to add comment