fork download
  1. #include <stdio.h>
  2.  
  3. int f(int a, int b, int c) {
  4. return (a <= b && a <= c) ? a : (b <= a && b <= c) ? b : c;
  5. }
  6.  
  7. int main() {
  8. printf("%d\n", f(1, 2, 3));
  9. printf("%d\n", f(6, 5, 4));
  10. printf("%d\n", f(5, 3, 7));
  11. return 0;
  12. }
  13. /* end */
  14.  
  15.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
1
4
3