© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies


CPP Program To Implement Selection Sort :

#include #include class SelSort { int a[25],len; public: void getdata(); void selectionsort(); void display(); }; void SelSort :: getdata() { cout<>len; cout<>a[i]; } void SelSort :: selectionsort() { int t; cout<"<<"("<=0)&&(t

Sample Input and Output:

Enter how many elements you want to sort

5

Enter the numbers
5
4
3
2
1

PASS->1  1 5 4 3 2
PASS->2  1 2 5 4 3
PASS->3  1 2 3 5 4
PASS->4  1 2 3 4 5

Final sorted list is 1 2 3 4 5

 
SLogix Student Projects

⇓Student Projects⇓
⇑Student Projects⇑
bottom