A simple method of carrying out this task would be to have two parallel vectors vector<string> names; vector<int> scores; However, you should avoid parallel vectors in your solution. //This program will read in the names and scores of students and display the names of the students with the highest and lowest scores //Version 1.0 #include… (0 comment)

vector<int> append(vector<int> a, vector<int> b) For example, if a is 1 4 9 16 and b is 9 7 4 9 11 then append returns the vector //This program will append one vector after another //Version 1.0 #include <iostream> #include <vector> using namespace std; vector<int> append(vector<int> a, vector<int> b) { for (int i = 0;… (0 comment)

#include <iostream> using namespace std; int main() { const double RATE_1 = .60; const double RATE_2 = .45; const double RATE_3 = .40; const double RATE_4 = .35; double kwh,total; cout << "The number of Kilowatt Hours used:" << endl; cin >> kwh; if(kwh>=2000) total = 999*RATE_1 + 500*RATE_2 + 500*RATE_3 + (kwh-1999)*RATE_4; else if(kwh>=1500)… (0 comment)

#include <iostream> #include <math.h> using namespace std; int main() { int number; cin >> number; int lastNumber = number % 10; //The last digit of a number int firstNumber = floor(number/pow(10,floor(log10(number)))); // The first digit cout << firstNumber << endl; cout << lastNumber << endl; system("pause"); return 0; }… (0 comment)

#include <string> using namespace std; int main() { string str = "Hello, World"; cout << str[0] << endl; //The first character cout << str.back() << endl; //The last character cout << str.substr(1) << endl; //Remove the first character cout << str.substr(0, str.length() - 1) << endl; //Remove the last character system("pause"); return 0; }… (0 comment)

That is, how can you read a letter that was encrypted with Caeser cipher, even if you don’t know the key? If you were a knowledgeable in the craft of programming you could copy and paste the encrypted message into a program that you created that would output to the user the 25 different shifts… (0 comment)