Algobox Christmas Tree Algorithms

Solved
Hello,

I need the algorithm for this program

https://www.sheffield.ac.uk/news/nr/debenhams-christmas-tree-formula-1.227810

which first asks for the height of the tree among these 4 heights: 2 meters, 1.8 meters, 1.62 meters, and 1.458 meters, then to choose from the 4 options: electric lights, garlands, star, and ornaments, as we can write in Algobox (so that I can test it).

Thank you in advance, this has been torturing my mind for quite some time!

Good evening!

Configuration: Windows 7 / Firefox 17.0

2 answers

  1. To be more precise, I'm looking to create an algorithm that asks the user for the height of their tree, then offers to choose which of the 4 pieces of information they want to obtain (electric garland, garland, star, or balls).

    I know that:

    x = tree height

    * Number of Christmas balls = ((sqrt(17)/20)*x*100
    * Length of garlands = 13π/8*x
    * Length of electric garlands = π*x
    * Diameter of the star = x/10

    Thank you in advance !!
    0