fork(1) download
  1. #include <stdio.h>
  2. int Min(int x,int y,int z){
  3. if(y<=x&&y<=z)
  4. return y;
  5. if(x<=y&&x<=z)
  6. return x;
  7. else
  8. return z;
  9.  
  10. }
  11.  
  12.  
  13. int main(void)
  14. {
  15. int a,b,c,min;
  16. scanf("%d%d%d",&a,&b,&c);
  17. min=Min(a,b,c);
  18. printf("min=%d\n",min);
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5368KB
stdin
7 2 3
stdout
min=2