Computer Science, asked by uusmanmajeed81801, 4 hours ago

how to find second smallest digit in an integer

Answers

Answered by madhurane78
0

Answer:

Java program to find the 2nd smallest number in an array

  • Compare the first two elements of the array.

  • If the first element is greater than the second swap them.

  • Then, compare 2nd and 3rd elements if the second element is greater than the 3rd swap them.

  • Repeat this till the end of the array.

Explanation:

Hope it's helpful

Similar questions