Sorting a vector through a lambda function
Problem
You are given a sequence of integers. Write a program that creates and sorts an array in descending order.
Input
First given number N — the number of elements in the array (1<=N<=100). Further, through the space, N numbers are written — array elements. The array consists of integers.
Output
It is necessary to output an array sorted in descending order.
Input |
Output |
5
4 56 23 67 100
| 100 67 56 23 4 |