Suppose that the input is XXXXXXXXXXWhat is the output of the following code? int num; int temp = 0; cin >> num; while (num != 0) { if (num % 2 == 0) temp = temp + num; else temp = temp - num; cin >>...


Suppose that the input is 20 -16 -5 15 6 0. What is the output of the following code?
int num;
int temp = 0;
cin >> num;
while (num != 0)
{
if (num % 2 == 0)
temp = temp + num;
else
temp = temp - num;
cin >> num;
}
cout < "temp = " << temp << endl;



"temp="">

>
Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here