// Write a function int max_of_four(int a, int b, int c, int d)
// which reads four arguments and returns the greatest of them.
#include<stdio.h>
#include<string.h>

int max_of_four(int a,int b, int c,int d);
int main(){
    int a,b,c,d;
    scanf("%d, %d, %d, %d ",&a,&b,&c,&d);
    printf("a:%d, b:%d, c:%d, d:%d \n",a,b,c,d);
    int e=max_of_four(a,b,c,d);
    printf("Max : %d",e);
    
    return 0;
}

int max_of_four(int a,int b,int c,int d){
    int e[4]={a,b,c,d};
    int max=e[0];
    int L=sizeof(e)/sizeof(e[0]);
    for(int i=0;i<L;i++){
        if (max<e[i]){
            max=e[i];
        }
    }
    return max;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: