Below is how the solution should look like.
Enter Y : 239847239
Enter X : 847
X is substring of Y
Enter Y : 239847239
Enter X : 3923
X is subsequence of Y
Enter Y : 239847239
Enter X : 489
X is neither substring nor subsequence of Y
and below is my crude attempt at making the code:
int main()
{
cout << "Enter Y: ";
vector <int> Y;
int Y_number;
cin >> Y_number;
cout << "Enter X: ";
vector <int> X;
cin >> X;
if (Y > X)
{
for(int i = 0; i < Y.size(); i++)
{
Y.push_back(Y_number);
if (Y.size(i) == X.size(i))
{
}
}
}
else
{
cout << "X is neither substring nor subsequence of Y";
}
}