Here is the part of code I wrote but this moves the array only one position to the right...----------------------------------------------------------------- cout<<"How many positions to the right do you want the array to be shifted? \n";
cin>>shift;
temp = array[size-1];
for(int i=size-1;i>0;i--)
{
array[i]=array[i-1];
}
array[0] = temp;
-=---------------------------------------------------------
Thisp rogram works perfectly but only if i want to shift one position.
I know I am close and I'm trying hard for the last couple of days to get this done ut just doesn't seem to work :(
Can any one help me here?