From f1fb35ab8bc5f508d0897acab9d77a09e9f3e672 Mon Sep 17 00:00:00 2001 From: vedu__sutar <103143204+vedu7649@users.noreply.github.com> Date: Thu, 27 Oct 2022 10:15:20 +0530 Subject: [PATCH] Create functions in C --- functions in C | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 functions in C diff --git a/functions in C b/functions in C new file mode 100644 index 0000000..bcc2169 --- /dev/null +++ b/functions in C @@ -0,0 +1,17 @@ +#include + +#define max(a,b) (a>b?a:b) + +int max_of_four(int a,int b,int c,int d){ + + return max(a,max(b,max(c,d))); +} + +int main() { + + int a, b, c, d; + scanf("%d %d %d %d", &a, &b, &c, &d); + int ans = max_of_four(a, b, c, d); + printf("%d", ans); + return 0; +}