help with ordering 3 strings

Write your question here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* 
 * File:   main.cpp
 * Author: Zac Pennace 
 *
 * Created on October 26, 2015, 5:59 PM
 */

#include <cstdlib>
#include <iostream>

using namespace std;

string earlier(string a, string b )
{
    if (a > b){
        return b;
        
    } else return a;
}


string earliest(string a, string b, string c)
{
 string d = earlier(a , b);
 string x = earlier(c,d);
 string w = latest(a,b);
 string q = latest (c,w);
 
 return x;
}

string later(string a, string b)

    {
    if (a > b){
        return a;
        
    } else return b;

}

string latest(string a, string b, string c)
{
    string e = later(a, b);
    string z = later(c,e);       
    return e;
}



string shortest(string a, string b, string c)
{
   string f; 
   return f;
}

string longest(string a, string b, string c)
{
    string g;
    return g;
}

int main() {
    string a; 
    string b;
    string c;
    
    
    cout << "Please Input Three Strings" << endl;
    cin >> a >> b >> c;
    
    
   
 
    return 0;
}
You forgot to ask a question.
1
2
3
4
string earliest(string a, string b, string c)
{
    return earlier( earlier(a, b), c )
 }
i need help finishing the code
Topic archived. No new replies allowed.