int main()
{
string s;
vector<CRational> mydata;
while (cin >> s)
{
CRational c(s);
mydata.push_back(c);
}
std::sort(mydata.begin(), mydata.end(), less);
for (int i=0; i<mydata.size(); i++)
{
mydata.at(i).Print();
}
return 0;
}
1/2
1/3
1/4
1/5
2/3
2/5
The output should be
1/5
1/4
1/3
2/5
1/2
2/3