Popular music characterized by vocals, hardback beat , loud volume and electric guitar :))) I really hope that helped if not let me know! :) <span />
Answer:
#include <iostream>
#include <vector>
using namespace std;
void calGPA();
vector<int> g;
vector<int> h;
int main(){
char pushMore = 'y';
int fg, fh;
for (;;){
if (pushMore == 'n'){
break;
} else{
cout<< "Enter integer for grade: ";
cin>> fg;
cout<< "Enter integer for credit hours: ";
cin>> fh;
g.push_back(fg);
h.push_back(fh);
cout<< "Do you want to add more grade and credit hours? y/n: ";
cin>> pushMore;
}
}
calGPA();
}
void calGPA(){
double total = 0, GPA;
for (int i = 0; i < g.size(); ++i) {
total += g.at(i) * h.at(i) ;
}
cout<< "The GPA is : "<< total/g.size();
}
Explanation:
The C++ source code above defines two vectors 'g' and 'h'. The latter holds the grades of a student while the former holds the credit hours for the subject taken. The void 'calGPA' function calculates and prints the student's GPA.
In C++, 'Try block' comprises of a group of statements in which there is a probability of an exception to take place.
C). The statements that would be left in the try block in case a particular statement leads to an exception 'can't be executed.'
- In case an exception takes place, the left statements in the try block fail to function.
- This is the primary reason for which a catch block immediately succeeds a try block in order to deal with the exception and help close that code to allow the statements to work.
- Thus, <u>option C</u> is the correct answer.
Learn more about 'Try block' here:
brainly.com/question/14186450
Primary storage would be downloads and whatever goes directly to your Dropbox or something like that. Secondary storage would also be downloads, but it would be the things that go to your hard drive, and lastly, off-line storage is storage on things like Flash Drives or CD-ROMs.