We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Introduction
- Functions in C
- Discussions
Functions in C
Functions in C
Sort by
recency
|
831 Discussions
|
Please Login in order to post a comment
include
int max_of_four(int a, int b, int c, int d) { int max = a; if (b > max) { max = b; } if (c > max) { max = c; } if (d > max) { max = d; } return max; }
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);
}
int max_of_four(int a,int b,int c, int d){ int max; if(a>b){ if(a>c){ max=(a>d)?a:d; } else { max=(c>d)?c:d; } } else if(b>c){ max=(b>d)?b:d; } else { max=(c>d)?c:d; } return max; }
int z[4]={e,f,j,k},g; g=z[0]; for (int i=0;i< 4;i++) { if (z[i]>g) { g=z[i]; } } return g;
Inat TV offers a diverse range of live channels, including sports, news, and movies, all in a user-friendly interface. It’s a cost-effective alternative to cable, frequently updated with fresh content. Compatible with various devices, Inat TV ensures you can enjoy your favorite shows anytime, anywhere.