Westonci.ca is the best place to get answers to your questions, provided by a community of experienced and knowledgeable experts. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.

Little Italy Pizza charges $14.95 for a 12-inch diameter cheese pizza and $17.95 for a 14-inch diameter cheese pizza. Write the pseudocode for an algorithm that calculates and displays how much each of these earns the establishment per square inch of pizza sold. (Hint: You will need to first calculate how many square inches there are in each pizza.)

Sagot :

Answer:

Following are the pseudocode to this question:

Declare variables A1, A2, B1, B2, C1,C2

Initialize B1 to 14.95

Initialize B2 to 17.95

Calculate A1=3.14*12*12/4

Calculate A2=3.14*14*14/4

Calculate C1=B1/A1

Calculate C2=B2/A2

PRINT "12 inches pizza earns $"+C1+" PER square inch"

PRINT "14 inches pizza earns $"+C2+" PER square inch"

Explanation:

In the above-given code, six variable "A1, A2, B1, B2, C1, and C2" is declared, in which "B1 and B2" is used for initializing the given value, in the next step "A1, A2, C1, and C2" variable is declared that calculates and store its values and use the print method to print its stored value with the message.