• + 0 comments
    #include <cmath>
    #include <cstdio>
    #include <vector>
    #include <iostream>
    #include <algorithm>
    using namespace std;
    
    
    int max_value(int a, int b, int c, int d) {
        
        int inputs[] = {a, b, c, d};
        int max_v = inputs[0];
        int size = sizeof(inputs) / sizeof(inputs[0]);
        
        for (int i=0; i < size; i++) {
            if (inputs[i] > max_v) {
                max_v = inputs[i];
            };
        };
        
        return max_v;
    }
    int main() {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT */   
        int a;
        int b;
        int c;
        int d;
        scanf("%d\n", &a);
        scanf("%d\n", &b);
        scanf("%d\n", &c);
        scanf("%d\n", &d);
        
        printf("%d\n", max_value(a,  b,  c, d));
        return 0;
    }