Question: Just provide the coding where it says: //PLEASE PUT YOUR WORK HERE //PLEASE END YOUR WORK HERE The questions are provided before the starting of
Just provide the coding where it says:
//PLEASE PUT YOUR WORK HERE //PLEASE END YOUR WORK HERE
The questions are provided before the starting of the codes as well.
Instructions
You will be given three integers: ??, ??and ??.
Determine the minimum number of swaps to sort 3 integers so that they are ordered in ascending order (from low to high).
Write the body of the program called PoD.java
Details:


CODE:
public class PoD {
/**
* Main method that runs when the program is started.
*/
public static void main(String[] args) {
//Instantiate new scanner to read from the console.
Scanner in = new Scanner( System.in );
//Declare & initialize variables
int i = in.nextInt();
int j = in.nextInt();
int k = in.nextInt();
System.out.println("Original order: " + i + " " + j + " " + k);
//PLEASE START YOUR WORK HERE
//PLEASE END YOUR WORK HERE
System.out.print("END OF OUTPUT");
}
}
DON'T PROVIDE WRONG CODE. IT WILL BE FLAGGED.
Input The program reads in three (unordered) integers: i, j and k Processing Calculate the minimum number of swaps that it would take to sort the three integers into ascending order. Output that number Output Output "Minimum swaps: "followed by the computed value. The text must be terminated by a new-line character
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
