1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
LekaFEV [45]
3 years ago
15

Write a program that uses an STL List of integers. a. The program will insert two integers, 5 and 6, at the end of the list. Nex

t it will insert integers, 1 and 2, at the front of the list and iterate over the integers in the list and display the numbers. b. Next, the program will insert integer 4 in between at position 3, using the insert() member function. After inserting it will iterate over list of numbers and display them. c. Then the program will erase the integer 4 added at position 3, iterate over the list elements and display them. d. Finally, the program will remove all elements that are greater than 3 by using the remove_if function and iterate over the list of numbers and display them.
Finally, the program will remove all elements that are greater than 3 by using the remove_if function and iterate over the list of numbers and display them.
Computers and Technology
2 answers:
Allisa [31]3 years ago
7 0
Hi! I don’t know what any of this means but I just wanted to tell you that I hope you have an amazing day and god/allah/etc bless you :)
poizon [28]3 years ago
5 0

Answer:

answer:

#include <iostream>

#include<list>

using namespace std;

bool Greater(int x) { return x>3; } int main() { list<int>l; /*Declare the list of integers*/ l.push_back(5); l.push_back(6); /*Insert 5 and 6 at the end of list*/ l.push_front(1); l.push_front(2); /*Insert 1 and 2 in front of the list*/ list<int>::iterator it = l.begin(); advance(it, 2); l.insert(it, 4); /*Insert 4 at position 3*/ for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " "; /*Display the list*/ cout<<endl; l.erase(it); /*Delete the element 4 inserted at position 3*/ for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " "; /*Display the list*/ cout<<endl;

l.remove_if(Greater); for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " ";

/*Display the list*/

cout<<endl; return 0;

}

You might be interested in
Can someone please help me? I have no clue what any of this is and how I'm going to find out 15 examples of these. It's due some
zvonat [6]
I am not really sure sorry
7 0
3 years ago
What is the name of the interface that uses graphics as compared to a command-driven interface?
bonufazy [111]
Answer = GUI (Graphical User Interface)
4 0
3 years ago
Of the three different types of résumé formats (chronological, functional, or combination), which format would you use to create
Varvara68 [4.7K]

Of the three types of resume formats (chronological, functional, or combination), I would select the combination format.

Explanation

Choosing the type of Resume depends on what you want your employer to see and the circumstances you are currently in. Some would prefer the chronological Resume because it the most popular Resume used. However, choosing a chronological resume while you are in the process of switching careers or have recently joined the job market is not a good idea. It is specifically meant for those people who have experience. Functional Resume, on the other hand, works well in situations where people have gaps in their work history or looking to switch from one career to the another one.

Combination Resume, in my opinion, stands out as the most preferred Resume to use. It is a combination of chronological and Functional Resumes. A combination Resume;

  • Helps you highlight both your transferable skills and work history
  • It can be used by older workers, those in internship programs, people seeking to switch careers, and experienced workers.
  • It helps showcase your skillset and helps highlight “why you think you are the best fit for the role” question.

Learn more about interview process and Resume structure

brainly.com/question/9018115

#LearnwithBrainly

3 0
3 years ago
Read 2 more answers
Which of the following is the term for software that automatically displays or downloads unwanted offers?
slega [8]
Adware. Adware displays ads and popups. The other options are completely different from each other
5 0
3 years ago
What is the law of the XNOR logic gate?
miskamm [114]

logic gate (AND, OR, XOR, NOT, NAND, NOR and XNOR) A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment, every terminal is in one of the two binary conditions low (0) or high (1), represented by different voltage levels.Mar 6, 2018




Read more on Brainly.com - brainly.com/question/11896675#readmore

6 0
3 years ago
Other questions:
  • The _____ is a computer-based test that measures the degree to which you associate particular groups of people with specific cha
    13·1 answer
  • Sometimes we write similar letters to different people. For example, you might write to your parents to tell them about your cla
    9·1 answer
  • Search engines enable you to
    9·2 answers
  • What are an administrator's choices for managing file permissions on a drive formatted as fat32?
    10·1 answer
  • How to search for the largest files on my computer vista?
    5·1 answer
  • What is the best brand of folders
    13·2 answers
  • We want to transmit 40 packets and the following packets are getting lost, 3,9, 25,28, 35. How many rounds are needed if
    5·1 answer
  • Similarities between inline css and internal css​
    6·1 answer
  • Why does my smoke detector keep beeping even after i change the battery?.
    14·1 answer
  • The equals method of the Object class returns true only if the two objects being compared:_________
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!