Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 512 Bytes

43_exercises.md

File metadata and controls

27 lines (19 loc) · 512 Bytes

< Back

43. constexpr and consteval

Exercise 430

Look at maze-builder

  • Browse the code in the repo

Implement a consteval function that calculates the volume of a box

Solution
consteval int volume(int width, int height, int depth) {
  return width * height * depth;
}