Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1.  
  2. public class Functionality {
  3.  
  4. public static void main(String[] args) {
  5.  
  6. }
  7. public static boolean containsMean(int[] array){
  8. boolean a = false;
  9. if(array != null && array.length>=1){
  10. int b = array.length;
  11. double c = 0;
  12. while(b>0){
  13. c = c + array[b-1];
  14. b=b--;
  15. }
  16. int d = (int)(c / array.length);
  17. int e = array.length;
  18. while(e>0){
  19. if(d == array[e-1]){
  20. a = true;
  21. }
  22. e=e--;
  23. }
  24. }
  25. return a;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement