top of page

Edabit Java: Stack the Boxes, Very Easy Difficulty


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;

}

}


14 views0 comments
Post: Blog2_Post
bottom of page