Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ PLS and asap thx 455336.3077858.qx3zqy7 Jump to level 1 Integer numValues is read from input. Then numValues integers are read and stored in

IN C++ PLS and asap thx

image text in transcribed

455336.3077858.qx3zqy7 Jump to level 1 Integer numValues is read from input. Then numValues integers are read and stored in vector valuesList. Write a loop that outputs each element in valuesList that is divisible by 7 , and subtracts 1 from each divisible by 7 element. End each output with ": corrected to a value not divisible by 7 " followed by a newline. Ex: If the input is 3272649 , then the output is: Original values: 272649 49: corrected to a value not divisible by 7 Nearest values not divisible by 7:272648 12345678910111213141516#include#includeusingnamespacestd;intmain){intnumValues;unsignedinti;vectorvaluesList;cin>>numValues;valuesList.resize(numValues);for(i=0;i>valuesList.at(i);} 2

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

Students also viewed these Databases questions

Question

=+3. How have your customers changed within the last three years?

Answered: 1 week ago

Question

6. How do histories influence the process of identity formation?

Answered: 1 week ago