+ 4

Challenge!! Let's go to order

I want a code to order all the elements of my array, for example: I have a[4]={5,3,8,4} ...after the code... a[4]={3,4,5,8}

6th Nov 2017, 8:23 PM
Yovani Pahuara
Yovani Pahuara - avatar
4 Respostas
+ 3
#include <algorithm> ... std::sort(a,a+4);
6th Nov 2017, 10:44 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 2
Arrays.sort(a[4]);
6th Nov 2017, 8:48 PM
Jeremy
Jeremy - avatar
11th Nov 2017, 12:03 PM
Jonathan Álex
Jonathan Álex - avatar