subject

Vector testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full credit is 100, so anything over 100 is extra credit. Ex: If testGrades = {101, 83, 107, 90}, then sumExtra = 8, because 1 + 0 + 7 + 0 is 8.

#include
#include
using namespace std;

int main() {
const int NUM_VALS = 4;
vector 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 */

cout << "sumExtra: " << sumExtra << endl;
return 0;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:30
This graph compares the total cost of attending educational institutions in texas. the graph demonstrates that the cost at private and public technical schools greatly varies.
Answers: 2
question
Computers and Technology, 24.06.2019 15:00
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. this can be done by normalizing to values between 0 and 1, or throwing away outliers. for this program, adjust the values by subtracting the smallest value from all the values. the input begins with an integer indicating the number of integers that follow. ex: if the input is 5 30 50 10 70 65, the output is: 20 40 0 60 55
Answers: 1
question
Computers and Technology, 24.06.2019 23:00
Why is it preferable to code web pages in html format? a. to create more lines code b. to apply general formatting rules c. to display properly as search results in all browsers d. to add meaning to the document
Answers: 1
You know the right answer?
Vector testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total ex...
Questions
question
Mathematics, 20.10.2019 05:00
question
Biology, 20.10.2019 05:00
Questions on the website: 13722359