#include<iostream>
using namespace std;
int main()
{
    char n,a[10];
    int i=0,flag=0;
    cin.getline(a,10);
    cin>>n;
do {
    if(n==a[i])
    {
     flag=1;
        break;
    }
    i++;
} while (a[i]!='\0');
    if(flag==1)
    {
        do {
            cout<<a[i];
            i++;
        } while (a[i]!='\0');
    }
    else
        cout<<"未找到";
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: