Question: Why does my code never branch properly? the z array only has values from the y array, even when the branch statement should have had

Why does my code never branch properly? the z array only has values from the y array, even when the branch statement should have had the x value overwrite the y value in the z array. I've also included what my code is supposed to do in C++.Why does my code never branch properly? the z array only hasvalues from the y array, even when the branch statement should have

; const int size =10; ; int x[size]={100,3,1,2,4,4,2,1,3,100}; ; int y[size]={53,247,95,7,481,91,33,1500,29,83}; ; int z[size],i; ; for (i=0;iy[i]) ;z[i]=x[i]; ; else ;z[i]=y[i]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!