Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- #include<stdio.h>
- using namespace std;
- int main() {
- int a1, a2;
- char s1[20], s2[20];
- cout << "nhap chuoi hien tai =" << endl;
- cin >> s1;
- cout << "nhap chuoi con =" << endl;
- cin >> s2;
- cout << strlen(s1) - strlen(strstr(s1, s2));
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment