subject

If the vector oldData is the same as the vector newData, print "Data matches!" ended with a newline. Otherwise, assign oldData with newData. Ex: If oldData = {10, 12, 18} and newData = {25, 27, 29, 23}, then oldData becomes {25, 27, 29, 23}. Only enter the Solution Part
#include
#include
using namespace std;
int main() {
vector oldData(3);
vector newData(4);
unsigned int i = 0;
oldData. at(0) = 10;
oldData. at(1) = 12;
oldData. at(2) = 18;
newData. at(0) = 25;
newData. at(1) = 27;
newData. at(2) = 29;
newData. at(3) = 23;
// Enter Solution here
for (i = 0; i < oldData. size(); ++i) {
cout << oldData. at(i) << " ";
}
cout << endl;
return 0;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
question
Computers and Technology, 23.06.2019 01:50
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. double the number. b. reverse the digits of the number. c. raise the number to the power of 2, 3, or 4. d. sum the digits of the number. e. if the number is a two-digit number, then raise the first digit to the power of the second digit. f. if the number is a three-digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit. after performing an operation if the number is less than 10, add 10 to the number. also, after each operation determine if the number is prime. each successive operation should be performed on the number generated by the last operation. your program should not contain any global variables and each of these operations must be implemented by a separate function. also, your program should be menu driven. 7. (fraction calculator) write a program that
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
You know the right answer?
If the vector oldData is the same as the vector newData, print "Data matches!" ended with a newline....
Questions
question
Arts, 20.03.2021 18:40
question
Mathematics, 20.03.2021 18:40
question
Mathematics, 20.03.2021 18:40
question
Mathematics, 20.03.2021 18:40
question
Biology, 20.03.2021 18:40
Questions on the website: 13722359