Saturday, 28 September 2013

create array of arrays from one array of Series(in c++)

create array of arrays from one array of Series(in c++)

how i create an array of arrays, from One-dimensional array of Series,
example: I have an array like : long int arr[20] = {23, 91, -71, -63, 22,
55, 51, 73, 17, -19,-65, 44, 95, 66, 82, 85, 97, 30, 54, -34};
and i want to create array of arrays in ascending order like: (in c++) 23,
91 -71, -63, 22, 55 51, 73 17 -19 -65, 44, 95 66, 82, 85, 97 30, 54 -34
already tried to now how many array there are
enter code here int sum=0;
for(int i=0;i<n-1;i++)
if(arr[i]>arr[i+1])sum++;
return sum;

No comments:

Post a Comment