subject
Engineering, 10.04.2020 20:25 bryantfoster

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 Engineering

question
Engineering, 04.07.2019 18:10
Consider a large isothermal enclosure that is maintained at a uniform temperature of 2000 k. calculate the emissive power of the radiation that emerges from a small aperture on the enclosure surface. what is the wavelength ? , below which 10% of the emission is concentrated? what is the wavelength ? 2 above which 10% of the emission is concentrated? determine the wavelength at which maximum spectral emissive power occurs. what is the irradiation incident on a small object placed inside the enclosure?
Answers: 2
question
Engineering, 04.07.2019 19:10
Agas contained within a piston-cylinder assembly e end nation about same energy states, 1 and 2, where pi 10 bar, v undergoes two processes, a and b, between the sam 0.1 m3, ui-400 kj and p2 1 bar, v2 1.0 m2, u2 200 kj: process a: process from 1 to 2 during which the pressure- volume relation is pv constant process b: constant-volume process from state 1 to a pressure of 2 bar, followed by a linear pressure-volume process to +20 0 state 2 kinetic and potential energy effects can be ignored. for each of the processes a and b, (a) sketch the process on p-v coordinates, (b) evaluate the work, in kj, and (c) evaluate process the heat transfer, in kj
Answers: 2
question
Engineering, 06.07.2019 04:10
Areheat rankine cycle operates with water as the working fluid. steam enters the first turbine at 8 mpa and 450°c and exits at 0.8 mpa. it is then reheated to 400°c before entering the second turbine, where it exits at 10 kpa. if the amount of work into the pump is 8.04 kj/kg and the net work per cycle produced is 1410.25 kj/kg, determine the thermal efficiency of the cycle.
Answers: 3
question
Engineering, 06.07.2019 04:30
Describe briefly, the concept of mass production in modern industrial system.
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
Computers and Technology, 07.12.2020 16:00
question
Mathematics, 07.12.2020 16:00
question
Mathematics, 07.12.2020 16:00
question
History, 07.12.2020 16:00
Questions on the website: 13722367