#[C++] Help with Lasagna Exercise
31 messages ยท Page 1 of 1 (latest)
Do you understand how elapsed time works? What elapsedTime(3, 20) means and why it is 26?
not really
oh wait I think I do
number of layers * 2 makes it 6
actual minutes is 20
you add them
how do I use one of the functions as a helper function?
Do you know how to call a function?
You don't need to call any functions.
If you go for a code review, a mentor may discuss that with you
But it's entirely unneeded to understand and solve this task
number of layers * 2 makes it 6
actual minutes is 20
you add them
That's exactly correct! Can you use that to solve this task?
Yeah you don't need to call any of the exercise functions, You just could do it.
As Isaac says tho you can discuss that with a mentor later on
We try to focus on passing the tests and solving the exercise here on Discord ๐ Leave the optimizations and improvements to the mentor discussions.
I think what I might have done wrong is that I didn't set numberOfLayers = numberOfLayers * 2
is this wrong?
That would double the number of layers you have?
oh wait
You already typed out an algorithm to solve it ๐
number of layers * 2 makes it 6
actual minutes is 20
you add them
Focus on implementing that
yeah
ok I solved it, but I'm not sure if I could do it in a more readable way.
// TODO: Calculate and return the total time so far.
return numberOfLayers * 2 + actualMinutesInOven;
}
did you see any previous function that you created share any similarity with the code you just wrote?
preparationTime()
maybe you can use that then