View Code of Problem 78

#include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;

int main()
{
	vector<string> str;
	string s;
	for (int i = 0; i < 3; i++) {
		cin >> s;
		str.push_back(s);
	}
	sort(str.begin(),str.end());
	for (int i = 0; i < 3; i++) {
		cout << str[i]<<"\n";
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 78