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
stepan [7]
1 year ago
15

write a loop that subtracts 1 from each element in lowerscores if the original element was greater than 0, and otherwise just as

signs the element with 0. ex: lowerscores
Computers and Technology
1 answer:
maw [93]1 year ago
8 0

The loop is used to repeatedly run the block of code in accordance with the condition stated in the loop. It entails repeated execution of the same code, which helps to traverse an array's items while also saving code.

#include <iostream>

#include <vector>

using namespace std;

int main() {

  const int SCORES_SIZE = 4;

  vector<int> lowerScores(SCORES_SIZE);

  unsigned int i;

  for (i = 0; i < lowerScores.size(); ++i) {

     cin >> lowerScores.at(i);

  }

  /* Your solution goes here  */

  for (i = 0; i < lowerScores.size(); ++i) {

     cout << lowerScores.at(i) << " ";

  }

  cout << endl;

  return 0;

}

Learn more about Loop here-

brainly.com/question/14390367

#SPJ4

You might be interested in
PLZ HELP IM DOING 2 other 100 work and I’m running out of time for school 1. Imagine you are a screenplay writer Discuss some po
Alexus [3.1K]
My mans this is to long to read ); I got u tho lemme pick
5 0
3 years ago
My computer is being weird, Everytime I begin to type something on here it keeps adding a letter to the beginning of my sentence
jek_recluse [69]

Answer:

Maybe you have shift lock on since it's highlighting and Ctrl C + Ctrl V your entire text? let me know if im wrong.

3 0
3 years ago
Write the importance of data and software security. ​
TEA [102]

Answer:

Safeguarding it from corruption and unauthorized access by internal or external people protects your company from financial loss, reputation damage, consumer confidence disintegration, and brand erosion.

8 0
3 years ago
Why cli and sti instructions are used during hooking aninterrupt?
mrs_skeptik [129]

Answer: Cli(Clear interrupt flag ) and sti(set interrupt flag) instructions are used for clearing the flag and setting or enabling a flag respectively while hooking an interrupt.

Explanation: During the action of hooking an interrupt,there are certain interruptions while changing of real time interrupt vector and to avoid those interruptions two instructions are used that is cli ans sli. Cli is present for the clearing or disabling the interrupt flag and sti is used for setting or enabling a interrupt flag.

4 0
4 years ago
Name what are the features of ram
fenix001 [56]

DDR: DDR is the very basic type of RAM. ...

DDR2: This type of RAM is now used mostly in the computers. ...

DDR3: DDR 3 can be found in the latest versions of the laptops and the PCs. ...

SDRAM: ...

SODIMM: ...

RAMBUS: ...

DIMM:

3 0
3 years ago
Other questions:
  • When broadcasting live on social, keep in mind that the best broadcasts are ones that feel like a conversation between brand and
    8·1 answer
  • Please describe in a few sentences
    14·1 answer
  • I need to know what is share market plssss
    8·2 answers
  • The point of (18 ,0) lies on​
    15·2 answers
  • Which of the following statements is TRUE of a peer-to-peer network?
    10·1 answer
  • help i was building my pc and i pushed the cpu into the socket really hard until there was an audible crack and it went into the
    7·1 answer
  • Throughout the lecture, the teacher speaks about the defintion of "Science"
    5·2 answers
  • Master controller for all activities that take place within a computer; primary purpose is to help the computer system monitor i
    8·2 answers
  • Task 2
    6·1 answer
  • It's in Python, everything sort of explained in the image below,
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!