Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1-4. Design detailed algorithms for the following problems. Your algorithm must have at least 4 to 5 steps and be clear. Please refer to chapter

1-4. Design detailed algorithms for the following problems. Your algorithm must have at least 4 to 5 steps and be clear. Please refer to chapter 1 examples and write only algorithms in either pseudocode or step-by-step descriptions. 1. Design an algorithm to find the weighted average of four test scores. The input data needs to be read in as a series of score-weight pairs. For example, this sample input data corresponds to a weighted average of 80: 80 0.20 90 0.20 85 0.10 75 0.50 Be sure to initialize any variables to zero when necessary. 2. Write an algorithm to prompt for and then read in the radius, in inches, and price of a pizza; then, compute and output the price of the pizza per square inch. 3. Chris and Terry have opened a new lawn service. They provide three types of services: mowing, fertilizing, and planting trees. The cost of mowing is $40.00 per 5000 square yards, fertilizing is $35.00 per application, and planting a tree is $50.00. Write an algorithm that prompts the user to enter the area of the lawn, the number of fertilizing applications, and the number of trees to be planted. The algorithm then outputs the billing amount. (Assume that the user orders all three services.) 4. Design an algorithm to find the roots of a quadratic equation of the form ax2 + bx + c. First prompt for floating-point values a, b, and c. If a is zero, output a message that the input values are invalid; otherwise, if there are no real roots output a message that there are no real roots; otherwise output both roots

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

e. What difficulties did they encounter?

Answered: 1 week ago