Edabit Java: Stack the Boxes, Very Easy Difficulty
- Justin Mah
- Jun 10, 2021
- 1 min read
Solving this question in edabit: https://edabit.com/challenge/ssHiWN2GD4oy7swEg using the math.pow function
Maybe I need to find some more difficult questions
Don't think we are improving our Java skills all that much, need to find something more challenging so that I can learn more stuff🤔
Question:

Answer:

public class Challenge {
public static int stackBoxes(int n) {
int i = (int)Math.pow(n, 2);
return i;
}
}








Comments