subject
Computers and Technology, 13.11.2020 16:30 ericuh

Write a loop that subtracts 1 from each element in lowerScores. If the element was already 0 or negative, assign 0 to the element. Ex: lowerScores = {5, 0, 2, -3} becomes {4, 0, 1, 0}.Sample program:#include using namespace std;int main() { const int SCORES_SIZE = 4; vector lowerScores(SCORES_SIZE); int i = 0; lowerScores. at(0) = 5; lowerScores. at(1) = 0; lowerScores. at(2) = 2; lowerScores. at(3) = -3; for (i = 0; i < SCORES_SIZE; ++i) { cout << lowerScores. at(i) << " "; } cout << endl; return 0;}Below, do not type an entire program. Only type the portion indicated by the above instructions (and if a sample program is shown above, only type the portion.)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:20
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
You know the right answer?
Write a loop that subtracts 1 from each element in lowerScores. If the element was already 0 or nega...
Questions
question
Mathematics, 19.02.2020 01:32
question
Mathematics, 19.02.2020 01:32
Questions on the website: 13722361