Advertisement
Coriic

Untitled

Jun 24th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. //---------------------------------------------------------------
  2. // Test program - grupa B
  3. //---------------------------------------------------------------
  4.  
  5. #include <stdio.h>
  6.  
  7. unsigned long long int check_tab(int *tab, int n, int *max);
  8.  
  9. int main() {
  10. int tab1[] = {-2,0,0,64,64};
  11. int tab2[] = {0,2,3,4,5,5,5, -1, 64, -1, -1, 5};
  12. int tab3[] = {0,-10, 66, 64, 64, 64};
  13. int tab4[] = {32,33,34,35,62,63};
  14. int tab5[] = {};
  15. unsigned long long int wyn;
  16. int max;
  17.  
  18. wyn = check_tab(tab1, 5, &max);
  19. printf("Result: %016llX, max: %d\n", wyn, max);
  20.  
  21. wyn = check_tab(tab2, 12, &max);
  22. printf("Result: %016llX, max: %d\n", wyn, max);
  23.  
  24. wyn = check_tab(tab3, 6, &max);
  25. printf("Result: %016llX, max: %d\n", wyn, max);
  26.  
  27. wyn = check_tab(tab4, 6, &max);
  28. printf("Result: %016llX, max: %d\n", wyn, max);
  29.  
  30. wyn = check_tab(tab5, 0, &max);
  31. printf("Result: %016llX, max: %d\n", wyn, max);
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement