Guest User

Untitled

a guest
Jan 19th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. public double[] getSidesGreaterThan(double userInput)
  2. {
  3.  
  4. int greater = 0;
  5.  
  6. for(int i = 0; i < sideLengths.length; i++)
  7. {
  8. if (sideLengths[i] > userInput)
  9. {
  10. greater++;
  11. }
  12. }
  13.  
  14. double[] sidesGreaterThan = new double[greater];
  15. int count = 0;
  16.  
  17. for (int i = 0; i < sideLengths.length; i++)
  18. {
  19. if (sideLengths[i] > userInput)
  20. {
  21. sidesGreaterThan[count] = sideLengths[i];
  22. count++;
  23. }
  24.  
  25.  
  26. }
  27. //RETURN SOMETHING HERE LOLDAOSDALSDOL
  28. }
  29. }
Add Comment
Please, Sign In to add comment