The program accepts unique integers x y and z as input.The program must swap the largest and second largest integers and print | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

The program accepts unique integers x y and z as input.The program must swap the largest and second largest integers and print

Input 23 14 56 output 56 14 23

11th Jan 2019, 1:44 PM
Padmapriya Ravichandran
Padmapriya Ravichandran - avatar
2 Answers
+ 9
Hello Padmapriya Ravichandran !! Please show your attempt first. We will help you if you stop anywhere in between
11th Jan 2019, 1:56 PM
Nova
Nova - avatar
+ 1
But only the position of first largest and second largest should change..if I sort I will happen to change their original location
11th Jan 2019, 2:19 PM
Padmapriya Ravichandran
Padmapriya Ravichandran - avatar