Advertisement
jordanov

namjmal

Dec 18th, 2015
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. //Najmal element
  5.  
  6. int mini(int x, int y, int z)
  7. {
  8. if(x<y)
  9. {
  10. y=x;
  11. }
  12. if(x<z)
  13. {
  14. z=x;
  15. }
  16. return x;
  17. }
  18.  
  19. int main()
  20. {
  21. int n,i,x,y,z;
  22.  
  23. scanf("%d ", &n);
  24. for(i=0;i<n;i++)
  25. {
  26. scanf("%d%d%d", &x, &y, &z);
  27. printf("%d", mini(x,y,z));
  28. }
  29.  
  30.  
  31.  
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement