Consider the following program: int x, y; cin >> x >> y: if(x>y) x= x-y; else if(x


Consider the following program:<br>int x, y;<br>cin >> x >> y:<br>if(x>y)<br>x= x-y;<br>else if(x<y)<br>y = y-x;<br>else<br>y=0;<br>cout << x+y << endl;<br>What will this program print on the following inputs? (Solution with steps traced)<br>a. x=12, y= 5<br>b. х- 27, у- 39<br>с. х -2, у 12<br>

Extracted text: Consider the following program: int x, y; cin >> x >> y: if(x>y) x= x-y; else if(x< x+y="">< endl;="" what="" will="" this="" program="" print="" on="" the="" following="" inputs?="" (solution="" with="" steps="" traced)="" a.="" x="12," y="5" b.="" х-="" 27,="" у-="" 39="" с.="" х="" -2,="" у="">

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here