Write a loop that subtracts 1 from each element in lowerscores.

Write a loop that subtracts 1 from each take into account lowerScores.
If factor had been 0 or bad, assign 0 toward factor.
Ex: lowerScores = {5, 0, 2, -3} becomes {4, 0, 1, 0}. Test system: #include
utilizing 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; } The following, usually do not form a whole system. Just kind the part suggested because of the preceding directions (and when an example system is shown above, just kind the part.)

Copyable rule:

for (i = 0; i < SCORES_SIZE; ++i) { // verify that the factor is 0 or bad if (lowerScores[i] < 0) { //assign 0 if the number is negative lowerScores[i] = 0; } else if(lowerScores[i] > 0)
{

lowerScores[i] = lowerScores[i]-1;
}
}
Code:
#include
#include
utilizing 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) { // verify that the factor is 0 or bad if (lowerScores[i] < 0) { //assign 0 if the number is negative lowerScores[i] = 0; } else if(lowerScores[i] > 0)
{

lowerScores[i] = lowerScores[i]-1;
}
}

for (i = 0; i < SCORES_SIZE; ++i) { cout << lowerScores.at(i) << " "; } cout << endl; system("pause"); return 0; } Solution: #include using namespace std; int main () const int SCORES SIZE-4; vector 0) lowerscoreslillowerScores il-1; for (i0 i< SCORES SIZE; ++i) cout<< lowerScores.at (i) <<""; cout << endl: system ("pause"); return 0 result: 4 0 1 0 Write a cycle that subtracts 1 from each take into account lowerScores.
If factor had been 0 or bad, assign 0 toward factor.
Ex: lowerScores = {5, 0, 2, -3} becomes {4, 0, 1, 0}.
Test system:
#include <iostream><br />
utilizing namespace std;</p>
<p>int main() {<br />
const int SCORES_SIZE = 4;<br />
vector<int> lowerScores(SCORES_SIZE);<br />
int i = 0;</p>
<p>lowerScores.at(0) = 5;<br />
lowerScores.at(1) = 0;<br />
lowerScores.at(2) = 2;<br />
lowerScores.at(3) = -3;</p>
<p><STUDENT CODE></p>
<p>for (i = 0; i < SCORES_SIZE; ++i) {
cout << lowerScores.at(i) << ;
}
cout << endl;

return 0;
}

The following, usually do not form a whole system. Just kind the part
suggested because of the preceding directions (and when an example system is
shown above, just kind the <STUDENT CODE> part.)’/> <img src=