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]
2 years ago
11

#include

Computers and Technology
1 answer:
Artist 52 [7]2 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
How to tell if screen or screen protector is cracked?
beks73 [17]
You will feel the screen protector crack
6 0
3 years ago
Read 2 more answers
The dns server translates the URL into the IP address 8.8.8.8. What is the next step in the process?
geniusboy [140]

Answer:

The web browser sends an HTTP request to the IP address, the IP address then sends the content that are displayed by the browser

Explanation:

The process of converting the typed in URL to a displayed page is as follows;

1) The typed in URL is sent to a DNS recursor by the browser

2) The recursor gets the DNS record for the domain from the cache if the record is cached or when the DNS record for the domain is not cached, the recursor makes a requests to the DNS root from which the name of the TLD nameserver is received

3) The TLD nameserver is contacted by the resolver to obtain the authoritative nameserver's IP address

4) With the information, the resolver contacts the authoritative nameserver and obtains the domain's IP address for the domain the resolver contacts

5) The obtained IP address for the URL's domain is then sent to the browser by the resolver

6) An HTTP request is sent by the browser to the IP address and the data received by the browser from that IP address is rendered and seen as the page content.

6 0
2 years ago
Effective nonverbal communication can cause tension.<br><br> True or False
agasfer [191]

Explanation:

When your nonverbal signals match up with the words you're saying, they increase trust, clarity, and rapport. When they don't, they can generate tension, mistrust, and confusion.

4 0
3 years ago
Using Word, Maureen is writing an outline of a presentation she plans to give to her company. She will be showing a video during
svlad2 [7]
A copy and paste would be fastest and easiest. As you can pinpoint the exact location to where you want the picture to be. 
5 0
2 years ago
Read 2 more answers
The letters LAN stand for Area Network.
Slav-nsk [51]

The letter LAN stand for : Local Area Network

8 0
2 years ago
Read 2 more answers
Other questions:
  • Peripherals can be used to input information. True False
    6·2 answers
  • Operating systems that have windows and icons have which type of user interface?
    15·1 answer
  • Does clearing your hard drive make your computer faster reddit
    13·1 answer
  • You can use RWA to demonstrate how to do something special on the web, such as displaying articles found on websites that suppor
    15·1 answer
  • Hello, please help write code in C++. Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go nort
    12·1 answer
  • What is application software used for
    13·1 answer
  • What are two types of crust on the earths surface
    15·2 answers
  • What is the full form of 'Rom<br>​
    7·2 answers
  • During the data transmission there are chances that the data bits in the frame might get corrupted. This will require the sender
    8·1 answer
  • I need app ideas for basic everyday problems​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!