Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use c++ Write a function that takes in an integer vector as a parameter. The function should prompt the user to enter integer values and

image text in transcribed

use c++

Write a function that takes in an integer vector as a parameter. The function should prompt the user to enter integer values and fill the vector with those values at the rear of the vector. It should continue to prompt the user until the user enters a -1. Use function declaration void modifyVector(vector>If the vector is empty, insert the value into the vector. >> If the vector is not empty and the user input is divisible by 5, then remove an element from the front of the vector. >>If the vector is not empty and the user input is divisible by 3, then remove an element from the end of the vector. >>Otherwise, insert the user input at the end of the vector. Note: You do not need to write the main0, the include, or namespace commands, you only need to write the function. Answer: (penalty regime: 0 %)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions