Question: Q9. Write a Program in Java that sorts 4 integer values in ascending order. Solution You will need 4 integer variables a, b, c,
Q9. Write a Program in Java that sorts 4 integer values in ascending order. Solution You will need 4 integer variables a, b, c, and d to store 4 values that need to be sorted. You will need a temporary variable temp You will need the following if conditions to compare if one value is greater than the other. o If(a>b) { } o If(b>c) { } o If(c>d) { } o If(b>c) { } o If(a>b) { } o If(b>c) { } I
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
