Each week a builder makes an order of doors from a supplier. The doors normally cost $60 each, but the supplier gives a 10% discount for any order of 30 or more doors. The orders for the first 8 weeks of the year are given in the vector: orders = [20 40 15 30 25 45 10 35] (a) Write an Octave program using a for loop and if statement to find the total cost of the doors ordered. (b) Extend your program using the find command to find which weeks the builder obtained a discount.

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter9: Systems Of Equations And Inequalities
Section9.6: The Algebra Of Matrices
Problem 42E
icon
Related questions
icon
Concept explainers
Topic Video
Question

Each week a builder makes an order of doors from a supplier. The doors normally cost $60 each, but the supplier gives a 10% discount for any order of 30 or more doors.

The orders for the first 8 weeks of the year are given in the vector:
orders = [20 40 15 30 25 45 10 35]


(a) Write an Octave program using a for loop and if statement to find the total cost of the doors ordered.


(b) Extend your program using the find command to find which weeks the builder obtained a discount.

Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Application of Algebra
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Trigonometry (MindTap Course List)
Trigonometry (MindTap Course List)
Trigonometry
ISBN:
9781337278461
Author:
Ron Larson
Publisher:
Cengage Learning
Algebra: Structure And Method, Book 1
Algebra: Structure And Method, Book 1
Algebra
ISBN:
9780395977224
Author:
Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:
McDougal Littell
College Algebra (MindTap Course List)
College Algebra (MindTap Course List)
Algebra
ISBN:
9781305652231
Author:
R. David Gustafson, Jeff Hughes
Publisher:
Cengage Learning
Intermediate Algebra
Intermediate Algebra
Algebra
ISBN:
9780998625720
Author:
Lynn Marecek
Publisher:
OpenStax College
College Algebra
College Algebra
Algebra
ISBN:
9781337282291
Author:
Ron Larson
Publisher:
Cengage Learning