Computer Science, asked by kulkarniayush1462, 11 months ago

C++ program to arrange numbers in ascending and descending order

Answers

Answered by Anonymous
1

\huge\mathbb\red{BONJOUR,}

\huge\mathfrak{Answer:}

To sort elements in Descending order, we need to pass a function as third parameter, we can use greater<>() function. This function creates comparison between the elements and puts the greater (largest element) first and then we can get descending order sorted elements. Syntax: sort(first, last, camp/function);

&lt;font color ="purple"&gt;&lt;marquee behavior ="alternate"&gt; ~♥~~♥~Hope It Helps~♥~~♥~&lt;/font color ="purple "&gt;&lt;/marquee behavior="alternate"&gt;

\huge\mathfrak{Regards}

\huge\mathbb\red{Aaravxxx}

Similar questions