If all your trying to do is sort int's / floats you are doing it the hard way, all you have to do is convert each string you input to a float and then sort them. So you can delete the other two functions (lrg, posd). Something thing you should aim to improve is your formatting, some parts of the code were very difficult to understand. And finally, not the biggest mistake in the world but you shoulden't use system("pause"), reason here: http://www.gidnetwork.com/b-61.html
But what I have done is converted the strings to floats by using atof and then sorted them. As atof can only handle plain char* strings you have to convert them by using string::c_str().
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
int n;
string numz[200];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> numz[i];
}
for (int i = 0; i < n - 1; i++) {
for (int j = 0; j < n - 1; j++) {
if (atof(numz[j].c_str()) > atof(numz[j+1].c_str())) {
numz[j].swap(numz[j+1]);
}
}
}
for (int i = 0; i < n; i++) {
cout << numz[i] << ' ';
}
//cout << numz[0];
// Pause the better way
cin.ignore();
cin.ignore();
return 0;
}
I have colored the main changes I made, hope this helps.