Functions in C | HackerRank
Problem Link : Functions in C
Solution :
Develop by Samsus Salehin Sabbir
- #include <stdio.h>
- int max(int a,int b)
- {
- return (a>b) ? a:b;
- }
- int main() {
- int a, b, c, d; // declear
- scanf("%d %d %d %d", &a, &b, &c, &d);
- int x = max(a,b);
- int y = max(x,c);
- int z = max(y,d);
- printf("%d\n", z);
- return 0;
- }
No comments