Форум » C/C++ для начинающих (C/C++ for beginners) » How to Group a value inside the Array based on high value and low value » Ответить

How to Group a value inside the Array based on high value and low value

ramees: i have a random number dynamic array in my code i need to filter my array. See below: link http://tinypic.com/view.php?pic=28iwzz9&s=8#.U3881HL7Jt8 int ary[]={2 ,5,6,7,5,4,2,1 , 3 ,3,6,10,9,6,2,1 }; i need output like this : out 1: 2 , 5 , 6 , 7 , 5 , 4 , 2 , 1 out 2: 3 , 3 , 6 ,10, 9 , 6 , 2 , 1 if my array like int a[] = { 1, 2, 1, 1, 1, 3 }; out 1: 1, 2, 1, 1, 1 out 2: 3, if my array like int a[] = { 1, 2, 1, 2, 1, 3 }; out 1: 1, 2, 1, out 2: 2, 1, out 3: 3, first largest value and its surrounding value group together and so on......

Ответов - 21 новых, стр: 1 2 All

Сыроежка: First of all I do not see any error. and do not know where the error occured. Any programmer can have many errors in his programs. But I do not think that we should discuss your errors in this thread. The question of the thread was answered with a detailed solution. You may create a new thread where you will describe your errors and present the corresponding code.



полная версия страницы