Guest User

Untitled

a guest
Feb 21st, 2018
85
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. int legmagasabb(int*tomb, int elemszam)
  3. {
  4. int m=tomb[0], i;
  5. for(i=0; i<elemszam; i++)
  6. if(tomb[i]>m)
  7. m=tomb[i];
  8. return m;
  9. }
  10. int main()
  11. {
  12. // l l f l l f l l f l l f
  13. int t[12] = {165,178,192,155,162,188,176,159,171,183,147,152};
  14. int res;
  15. res=legmagasabb(t,12);
  16. printf("Legmagasabb:%d cm\n", res);
  17. return 0;
  18. }
Add Comment
Please, Sign In to add comment