1int main()
2{
3 // Get the vector
4 vector<int> a = { 1, 45, 54, 71, 76, 12 };
5
6 // Print the vector
7 cout << "Vector: ";
8 for (int i = 0; i < a.size(); i++)
9 cout << a[i] << " ";
10 cout << endl;
11
12 // Sort the vector in descending order
13 sort(a.begin(), a.end(), greater<int>());
14
15 // Print the reversed vector
16 cout << "Sorted Vector in descendiing order:n";
17 for (int i = 0; i < a.size(); i++)
18 cout << a[i] << " ";
19 cout << endl;
20
21 return 0;
22}