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
The filament of an incandescent lamp has a temperature of 2000k. calculate the fraction of radiation emitted in the visible light band if the filament is approximated as blackbody
Answers: 2
question
Engineering, 04.07.2019 18:20
Find the kinematic pressure of 160kpa. for air, r-287 j/ kg k. and hair al viscosity of air at a temperature of 50°c and an absolute (10 points) (b) find the dynamic viscosity of air at 110 °c. sutherland constant for air is 111k
Answers: 3
question
Engineering, 04.07.2019 18:20
Acertain flow of air (at stp) has a velocity distribution given by v i (in ft/s). if this flow is going through a 4 ft square area in the yz-plane (centered at the origin), what is the mass flow rate (in lbm/s)?
Answers: 2
question
Engineering, 04.07.2019 18:20
Water vapor initially at 10 bar and 400 °c is contained within a piston-cylinder assembly. the water lost heat to the surrounding according to isochoric (iso-volumetric) process until its temperature is 150 °c. the water is then condensed isothermally to saturated liquid. for the water as a system, calculate the work in kj/kg
Answers: 2
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
Mathematics, 24.09.2019 04:00
question
History, 24.09.2019 04:00
question
Chemistry, 24.09.2019 04:00
question
Physics, 24.09.2019 04:00
Questions on the website: 13722365