#include <iostream>
#include <string>
void sort(std::string s[], int rows) {
std::string tmp;
for (int i = 0; i < rows - 1; i++) {
for (int j = i + 1; j < rows; j++) {
if (s[i] > s[j]) {
tmp = s[i];
s[i] = s[j];
s[j] = tmp;
}
}
}
}
int main()
{
std::string s[] = { "<string>", "<iostream>", "<ostream>", "<numbers>", "<algorithm>" };
int rows = sizeof(s) / sizeof(*s);
sort(s, rows);
for (int i = 0; i < rows; i++) {
std::cout << s[i] << std::endl;
}
}
/*
run:
<algorithm>
<iostream>
<numbers>
<ostream>
<string>
*/