Hi everyone , I'm training on C++ language and I have some troubles about array. My problem is arranging in array. Example, I have an float array, I wanna sort my negative numbers descending on the left, the zero (0) numbers in the middle and positive number ascending on the right in three ways: selection sort, insert sort and bubble sort. I hope you spare a little time to help me.

Thanks in advance and have a nice day.

Code:

#include <stdio.h> #include <conio.h> #include <iostream.h> void input(int *a, int n) { for(int i=0;i<n;i++) { cout << "a[" << i << "]= "; cin >> a[i]; } } void output(int *a,int n) { for(int i=0;i<n;i++) { cout << a[i] << "\t"; } } void swap(int &a,int &B) { int tmp=a; a=b; b=tmp; } void main() { clrscr(); int n; int *a; cout << "Enter numbers of array: "; cin >> n; input(a,n); output(a,n); getch(); }