Question
THIS IS PEP/9 ASSEMBLY LANGUAGE ONLY NO JAVA NO C or C++ PLEASE NO RABBITS I DONT KNOW WHERE IT IS COMING FROM STOP COPYING
THIS IS PEP/9 ASSEMBLY LANGUAGE ONLY
NO JAVA
NO C or C++
PLEASE NO "RABBITS" I DONT KNOW WHERE IT IS COMING FROM STOP COPYING AND PASTING.
A bell distributor receives a shipment of N bells from the foundry. Unfortunately, one eighth of them are cracked and have to be sent back. As many as possible of these flawed bells are packed into large crates that hold 16 bells, the rest are sent back individually. Costs to transport the flawed bells are as follows:
- Crate of 16: $20
- Individual: $2
The good bells are mailed to distributors. As many as possible of the good bells are packed into boxes each of which can hold 8 bells. The remainder are mailed individually. Costs to mail the good bells are as follows:
- Box of 8: $18
- Individual: $3
Write and test a Pep/9 assembly code program that inputs N and outputs a report on the disposition of the bells, see example below.
Example Output Enter N: 430 Bells received: 430 Good bells: 377 Bad bells: 53 Number of crates: 3 Number of individual flawed: 5 Number of boxes:47 Number of individual good: 1 Cost to ship crates: $60 Cost to ship individual flawed: $10 Cost to mail boxes:$846 Cost to mail individual good: $3 Total cost: $919 Example Output Enter N: 430 Bells received: 430 Good bells: 377 Bad bells: 53 Number of crates: 3 Number of individual flawed: 5 Number of boxes:47 Number of individual good: 1 Cost to ship crates: $60 Cost to ship individual flawed: $10 Cost to mail boxes:$846 Cost to mail individual good: $3 Total cost: $919
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started