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
Which of the following combinations would constitute a vertical merger?
Ksenya-84 [330]

Answer:

D

Explanation:

A vertical merger is when two or more companies merge and are involved at different stages in the supply chain process for a common good or service.  The merger is purposed to increase synchronism, gain more control of the supply chain process, and increase business. Also, it often results in reduced costs and increased productivity and efficiency.

A good example of a vertical merger is a auto manufacturer purchasing a tire company.  A vertical merger  of this sort reduces the cost of tires for the automaker and creates the possibility for expansion of its business by allowing it to supply tires to competing automakers.

6 0
4 years ago
SUWIDHA stands for .​
Anettt [7]
SUWIDHA stands for Single User-friendly Window Disposal & Help-line for Applicants.

Hope it helps
5 0
3 years ago
Add me on fornite buddies Lynn_.25
Anna007 [38]

i- why would u ask that

Explanation:

6 0
3 years ago
Read 2 more answers
You have an insurance policy with a $300 premium and a $500 deductible. How much should you expect to pay the insurance company
Assoli18 [71]
200$ it's easy 500-300
4 0
3 years ago
Search engines rank Web pages based on which of the following?
Alexus [3.1K]

Answer:

The popularity and credibility of the Web page.

The page must have a lot of traffic on it, and for this to happen the page must also be a provider of most needed information.

5 0
3 years ago
Other questions:
  • Universal Windows Platform is designed for which Windows 10 version?
    7·1 answer
  • When working with a table, combining two or more cells into one is known as _____.
    12·1 answer
  • What Windows Server 2016 feature leverages the storage contained on a network of servers and adds a new level of fault tolerance
    14·1 answer
  • Which would increase electric current? increasing the resistance increasing the size of the wire decreasing the voltage
    6·1 answer
  • Consider the following code segment.
    12·1 answer
  • Explain agile testing ​
    11·1 answer
  • Multiply the following two Tom's Tiny floating-point format numbers (8-bit: sign bit, 3-bit 2's complement exponent, 4-bit fract
    12·1 answer
  • Please help me with my question ​
    15·2 answers
  • How do you keep word from trying to capitalize every isolated letter "i"
    15·2 answers
  • Hayne is starting his own business as a psychotherapist and needs to post a website advertising his services,contact information
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!