write the programming logic to find the largest value among
write the programming logic to find the largest value among 4 separate variables.Assume there are 4 boxes(box A box B, box C and box D) and each of them contains money. Your ifelse logic must find the box that has the largest(maximum money)
please do it in a clear handwriting with detailed work.
Solution
Hi, Please find my logic.
Please let me know in case of any issue.
int value1, value2, value3, value4;
int max = value1; // initializing max with value1
if(max < value2)
max = value2;
if(max < value3)
max = value3;
if(max < value4)
max = value4;
