about | help | code help+videos | done | prefs |
Write a method that finds the "crazy sum" between two integers. The "crazy sum" is the sum of all the squares of all the integers from low to high. For example, if low is 3 and high is 5, you would calculate the sum of three squared plus four squared plus five squared, which is 9+16+25. So you would return 50. As preconditions, 0<=low<=high and the sum will not exceed the maximum integer value in Java. ggg1CrazySum(1, 1) → 1 ggg1CrazySum(0, 3) → 14 ggg1CrazySum(14, 24) → 4081 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 250
Copyright Nick Parlante 2017 - privacy