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
Water in a partially filled large tank is to be supplied to the roof top, which is 8 m above the water level in the tank, through a 2.2-cm-internal-diameter pipe by maintaining a constant air pressure of 300 kpa (gage) in the tank. if the head loss in the piping is 2 m of water, determine the discharge rate of the supply of water to the roof top in liters per second.
Answers: 3
question
Engineering, 04.07.2019 18:10
Ahot wire operates at a temperature of 200°c while the air temperature is 20°c. the hot wire element is a tungsten wire of 5 um diameter and 2 mm in length. plot using excel current, heat transfer and heat generated by the wire for air velocity varying from 1-10 m/s in steps of lm/s? matlab the sensor voltage output, resistance, or assume nu 0.989 re033pr13 take air properties at tr (200°c20°c)/2 = 110°c properties of tungsten: c 0.13 kj/kg.k 3 p 19250 kg/m k (thermal conductivity) = 174 w/m.k
Answers: 2
question
Engineering, 04.07.2019 19:10
10 kg of co2 is initially contained at 400 kpa and 300 k. the gas constant for carbon dioxide is 189 j/lkg k) and has a specific heat ratio, k, of 1.289. isentropic expansion then occurs until the pressure is 200 kpa. a) determine the initial volume of co2 in m. b) determine the final temperature in k. c) determine the work done by the system during the expansion kl.
Answers: 2
question
Engineering, 04.07.2019 19:10
When subject to a steady load (within elastic range) over a long period of time, what is the major difference in material behavoir between steel and plastic?
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
Spanish, 10.01.2021 19:40
question
Mathematics, 10.01.2021 19:40
question
Biology, 10.01.2021 19:40
question
Arts, 10.01.2021 19:40
Questions on the website: 13722367