From 8a3d9889795db1a680c0ebce0d23fc91cb09071d Mon Sep 17 00:00:00 2001 From: Chetanya Chopra Date: Mon, 1 Aug 2016 00:59:32 -0700 Subject: [PATCH] rotate elements of array to the left You can rotate elements of array to the left .. --- Array_left_rotation.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Array_left_rotation.cpp diff --git a/Array_left_rotation.cpp b/Array_left_rotation.cpp new file mode 100644 index 000000000..11fa154d1 --- /dev/null +++ b/Array_left_rotation.cpp @@ -0,0 +1,30 @@ +#include +using namespace std; +int main(){ + int n,k; + cout<<"Enter size of array=\t"; + cin>>n; + cout<<"Enter Number of indeces u want to rotate the array to left=\t"; + cin>>k; + int a[n];cout<<"Enter elements of array=\t"; + for(int i=0;i>a[i]; + } + int temp=0; + for(int i=0;i