Help me in solving MAXTHREE problem

My issue

answer

My code

#include <iostream>
using namespace std;

int input(){
    int N;
    cin>>N;
    if (N<=1 || N>=20){
        input();
    }
}

int maxi(int N, int l){
    l++;//1  
    int a, b, c;
    cin >> a >> b >> c;
    int max_value = a;
    if (b > max_value) {
        max_value = b;
    }
    if (c > max_value) {
        max_value = c;
    }
    cout << max_value << endl;
    if(l<N){
        maxi(N,l); 
    }
}

int main() {
    int N,max_value,l=0;
    N = input(); // Read the number of triples

    maxi(N,l);
    return 0;
}

Problem Link: MAXTHREE Problem - CodeChef

@shravanjare
U have done implementation mistakes.
I have corrected it in your code. hope u will get it.

#include <iostream>
using namespace std;


void maxi(){
    int a, b, c;
    cin >> a >> b >> c;
    int max_value = a;
    if (b > max_value) {
        max_value = b;
    }
    if (c > max_value) {
        max_value = c;
    }
    cout<< max_value <<endl;
}

int main() {
    int N;
    cin>>N;
    while(N--)
    {
        maxi();
    }
}