#Lasagna C++ Task 4 :white_check_mark:

11 messages · Page 1 of 1 (latest)

buoyant finch
#

I'm stuck on Task 4. Here is the test, and my code. I'm not sure why my code won't work, and the hints in the test are not helping, it's confusing me and not helping me understand.

stark fjord
#

remaining time in over is not relevant here
you only need the time to cook all layers + the actual time in oven

#

@dim ruin Is that a typo in the second picture? Test 6 said : Fresh in the oven, 12 layers! But the input int is only 11.

dim ruin
#

Yes, that might be. I'll have to correct that

buoyant finch
#

So the function involving 2 minutes per layer is relevant in the sum, right?

buoyant finch
# dim ruin Yes, that might be. I'll have to correct that

i declared the function: preparationTime(numberOfLayers) in the elapsed time function because it involves the variable for layers and variable for 2 minutes, that way it's two minutes per layer. I see why the remaining oven time function is not relavant. What is the actual time in the oven? is it the second parameter in elapsedTime?

#

Oh! I got it!

#

The second parameter in elapsedTime is what is involved in the sum. It worked! Thank you!

stoic wagon
buoyant finch
#

(✅)

stoic wagon
#

(on the initial top post)