vendredi 4 novembre 2022

Open box, volume, C++

C++

Open Box

An open box is made from a piece of rectangular cardboard by cutting out squares of equal size from the four corners and bending up the sides. What size should the squares be to obtain a box with largest possible volume? The length and width of the cardboard are given by user.

Write a C++ program that uses function-driven style to solve this problem. Allow your program run again and again as often as the user wishes. With a function-driven program, the main function will contain only function calls, to call to all other functions. Variable declarations are allowed in the main function; besides that, nothing else is allowed.

I can find max on paper, but i dont have idea for C++

Aucun commentaire:

Enregistrer un commentaire