Advertisement
Guest User

Untitled

a guest
Nov 26th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. int maks(int x, int y, int z)
  3. {
  4. int maksim=0;
  5. if (x>maks)
  6.  
  7. {
  8. maksim=x;
  9. }
  10. if (y>maksim)
  11. {
  12. maksim=y;
  13. }
  14. if (z>maksim)
  15. {
  16. maksim=z;
  17. }
  18. return maksim;
  19. }
  20. int main()
  21. {
  22. int x,y,z,maksim;
  23. printf("podaj 3 liczby polski smieciu");
  24. scanf("%d %d %d" ,&x,&y,&z);
  25. printf ("największa wspólna liczba to: %d" ,maks())
  26. maks(x,y,z);
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement