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
Stolb23 [73]
3 years ago
11

#include

Computers and Technology
1 answer:
Artist 52 [7]3 years ago
3 0

Answer:

#include <iostream>

#include <vector>

using namespace std;

int main() {

const int NUM_VALS = 4;

vector<int> testGrades(NUM_VALS);

int i = 0;

int sumExtra = -9999; // Assign sumExtra with 0 before your for loop

testGrades.at(0) = 101;

testGrades.at(1) = 83;

testGrades.at(2) = 107;

testGrades.at(3) = 90;

/* Your solution goes here */

sumExtra = 0;

for(i = 0; i <= testGrades.size() -1; i++){

   if(testGrades.at(i) > 100){

       sumExtra = sumExtra + (testGrades.at(i) - 100);

   }

}

cout << "sumExtra: " << sumExtra << endl;

return 0;

}

Explanation:

Looks like you almost solved the question. I highlighted the parts you have been missing above.

In order to use vectors in C++, you need to add the vector library at the beginning of the program, #include <vector>

In order to initialize the vector, you need to specify its type inside <int>, since we work with the integers in the question the type must be <em>int</em>

You might be interested in
Tamika has received an average of 97% on all of her math tests, has done well on her homework assignments, and participates in c
sashaice [31]

Answer:

B is the correct answer.

6 0
3 years ago
Read 2 more answers
All of the following are aspects of the search process except
Len [333]
You need to provide the options or we cant provide you with the incorrect answer.
8 0
3 years ago
scientist think that two species with homologous structures probably had ____ A. Ancestor B. Fossil C. Environment D. Offspring
Naddika [18.5K]
The answer is A: ancestor
4 0
3 years ago
Import simplegui
victus00 [196]

Answer:

ooh....

Explanation:

For example, to convert from bar to pounds per square inch you would multiply by 100000 then divide by 6894.757. Or, multiply by 100000/6894.757 = 14.503774. So, to convert directly from bar to pounds per square inch, you multiply by 14.503774.

3 0
3 years ago
What word is used today to refer to network-connected hardware devices?.
lions [1.4K]
Th answer to your question is Endpoint
5 0
2 years ago
Other questions:
  • Select the best answer for the question. 19. While broadcasting a football game, the announcer exclaimed, "I can't believe it. C
    7·2 answers
  • What phrase best describes the overall structure of the<br> passage
    9·1 answer
  • At an open or uncontrolled intersection, yield if ____.
    15·2 answers
  • Which of the following is not a benefit of normalization?
    5·1 answer
  • When designing a suitable and safe flexibility training program, you should set reasonable and appropriate goals depending on wh
    15·1 answer
  • In linear​ programming, what are restrictions that limit the degree to which a manager can pursue an​ objective?
    15·1 answer
  • ___________ is related to mass, but also includes the gravitational pull of the Earth.
    14·1 answer
  • Describe how the presence or absence of balance can affect a visitor’s perceptions of a Web page.
    7·1 answer
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a cowor
    7·1 answer
  • How to make a 'Sign in with replit' button in replit (Node.js) will make brainliest
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!