Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What is an algorithm? Bob enters a pizza shop and notices there are three differ

ID: 3646514 • Letter: W

Question

What is an algorithm? Bob enters a pizza shop and notices there are three different sizes of pizzas available. Sizes are given as the diameter of the pizza in inches. The cost of a pizza is based on the size. Bob would like to know which size of pizza has the lowest cost per square inch. Identify the inputs and outputs for this problem. Identify the processing needed to convert the inputs to the outputs. Design an algorithm in pseudocode to solve this problem. Make sure to include steps to get each input and generate each output.

Explanation / Answer

a1 a2 a3 area of the pizza c1 c2 c3 cost of the pizza a1a2a3c1c2c3 are inputs Puedo code l1 = c1/a1 l2 = c2/a2 l3 = c3/a3 b = sort(l1,l2,l3) print min(b) Hence the output will be either l1,l2 or l3

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote