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.
Unitary Method
The word “unitary” comes from the word “unit”, which means a single and complete entity. In this method, we find the value of a unit product from the given number of products, and then we solve for the other number of products.
Speed, Time, and Distance
Imagine you and 3 of your friends are planning to go to the playground at 6 in the evening. Your house is one mile away from the playground and one of your friends named Jim must start at 5 pm to reach the playground by walk. The other two friends are 3 miles away.
Profit and Loss
The amount earned or lost on the sale of one or more items is referred to as the profit or loss on that item.
Units and Measurements
Measurements and comparisons are the foundation of science and engineering. We, therefore, need rules that tell us how things are measured and compared. For these measurements and comparisons, we perform certain experiments, and we will need the experiments to set up the devices.
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
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.
Step by step
Solved in 3 steps with 3 images