Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A widget distributor receives a shipment of N widgets from the manufacturer. Unfortunately, oneeighth of them are not up to specification and cannot be shipped.

A widget distributor receives a shipment of N widgets from the manufacturer. Unfortunately, oneeighth of them are not up to specification and cannot be shipped. The remaining widgets are shipped to a central warehouse. A standard mailing box holds 16 widgets and costs $8 to mail. Any widgets left over are shipped individually at a cost of $2 each. Write and test a Pep/9 assembly language program that inputs N and outputs the total cost of mailing the widgets. (Cost may be approximate because of limitations of integer arithmetic

Example

N = 300

widgets are received from the manufacturer

One eighth (37) are not up to specification leaving 263

Sixteen boxes of 16 can be filled leaving 7 widgets to be shipped individually

Total cost = (16 * $8) + (7 * $2) = $142

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

Step: 3

blur-text-image

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions