please solve in easy way and c++
Write a C++ program to Solve the following function: 1. 1-0 is double, n, y, and x are integer numbers Try the following examples l. n-l 0=> x=2, y[]={-1, 2, 3, 4, 5, 2, 1, 2, 1,-1 }, 2. n=5-> x-3, y[] = { I , I , 2, 1,2 } 3. n=5 ==> x=-4, y[] = {-2, 1, 1, 2, 1 } Show transcribed image text Write
OR
OR