diff --git a/SelectionSort.cpp b/SelectionSort.cpp new file mode 100644 index 000000000..22d3fc5c7 --- /dev/null +++ b/SelectionSort.cpp @@ -0,0 +1,39 @@ +//Selection Sort + +#include +using namespace std; + +int main() +{ + int Array[6]; + cout<<"\nEnter any 6 Numbers for Unsorted Array : "; + + //Input + for(int i=0; i<6; i++) + { + cin>>Array[i]; + } + + //Selection Sorting + for(int i=0; i<6; i++) + { + int min=i; + for(int j=i+1; j<6; j++) + { + if(Array[j]