Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int input=0;
- int array[6]={1,2,3,4,5,8};
- for(int i=0;i<5;i++){
- cout<<array[i]<<" ";
- }
- cout<<endl;
- cin>>input;
- for(int g=0;g<input;g++){
- array[6]=array[0];
- for(int count=1;count<6;count++){
- array[count-1]=array[count];
- }
- }
- for(int print=0;print<5;print++){
- cout<<array[print]<<" ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement