main()
{
int *x;
int n, i;
cin>>n;
for(i = 0; i< n; i++)
cin>>x[i];
/* reapeat following until n times with new array */
int k = func(x, n);
for(i = 0;i<n; i++)
x[i] = x[i+1];
x[n-1] = k;
then to repeat until n times with added new value k?
i tried goto command but still not good work
main()
{
int *x;
int n, i;
int loop=0;
cin>>n;
for(i = 0; i< n; i++)
cin>>x[i];
goto again:
int k = func(x, n); /* k would be x massiv's last element then goto func() again */
for(i = 0;i<n; i++)
x[i] = x[i+1];
x[n-1] = k; // k will be last elm of massiv
loop++;
if(loop<n)
goto again;
delete[] x;
delete[] y;
}
double *func(int *x, int n)
{
/* */
return k;
}