Question: a) Trace the output for this program segment if input data for mark1, mark2 and mark3 are 57, 43 and 87 respectively. Create a

a) Trace the output for this program segment if input data for 

a) Trace the output for this program segment if input data for mark1, mark2 and mark3 are 57, 43 and 87 respectively. Create a tracing table to show the steps: cin >> markl >> mark2 >> mark3; if (markl > mark2 && markl >= mark3) 1 a = mark1; if (mark2 > mark3) b = mark2; else } else b = mark3; if (mark2 > mark3) ( } else ( a = mark2; if (mark3 > markl) b- mark3; else b-markl; a mark3; if (marki > mark2) b markl; else b = mark2; cout < < XXXX is = " < < a: cout < < endl; cout < < "YYYY is < < bi b) For the code in question, what would be a suitable phrase to replace XXXX and YYYY which shows the better output that is solved by the code. (5 marks)

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 Programming Questions!