Complete the program below by filling in code.
#include
#include
#include
#inc...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 15.10.2020 08:01 tinytoonjr8052
Complete the program below by filling in code.
#include
#include
#include
#include
using namespace std;
void print(const string& title, const vector& v)
{
cout << title << " ";
for (int i = 0; i < v. size(); i++)
cout << v[i] << " ";
cout << endl;
}
int main()
{
vector v;
for (int i = 0; i < 5; i++)
v. push_back(i);
FILL_CODE
FILL_CODE
print("The elements in vector:", v);
sort(v. begin(), v. end()); // Sort the elements in v
print("Sorted elements:", v);
random_shuffle(v. begin(), v. end()); // Shuffle the elements in v
print("After random shuffle:", v);
cout << "The max element is " <<
*max_element(v. begin(), v. end()) << endl;
cout << "The min element is " <<
*min_element(v. begin(), v. end()) << endl;
int key = 45;
if (find(v. begin(), v. end(), key) == v. end())
cout << key << " is not in the vector" << endl;
else
cout << key << " is in the vector" << endl;
return 0;
}
![ansver](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 08:00
Digital information is stored using a series of ones and zeros. computers are digital machines because they can only read information as on or off –1 or 0. this method of computation is known as the system
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead która śledzi lee w 4 epizodzie
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 04:31
Q13 what function does a security certificate perform? a. creates user accounts b. scrambles data c. identifies users d. creates password policies e. provides file access
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 23.05.2020 20:57
![question](/tpl/images/cats/mat.png)
Mathematics, 23.05.2020 20:57
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 23.05.2020 20:57
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 23.05.2020 20:57
![question](/tpl/images/cats/en.png)
English, 23.05.2020 20:57
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 23.05.2020 20:57
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/fizika.png)
Physics, 23.05.2020 20:57
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 23.05.2020 20:57