Isigar

Untitled

Dec 3rd, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. ty píčoviny jako packet, a construktor a pod.
  2.  
  3. int[] arr = {nejakejcisla};
  4. arr.sort(); Setřídí od nejmenší po nezvětší
  5.  
  6. arr[0] nejmenší
  7. arr[arr.length] nevetsi
  8.  
  9. prumer:
  10.  
  11. for(int index = 0; index < arr.length; index++) {
  12.  
  13. int komplet = komplet+arr[index];
  14. }
  15.  
  16. float prumer = komplet/arr.lenght;
Advertisement
Add Comment
Please, Sign In to add comment