Hi, I have an issue with this coding assigment... I have already done everything possible to make it good but I am not getting the output that I should get.    This is what I have done so far but I'm yielding different results. The assignment is supposed to be in Coral Programming form.    integer money integer pennies integer dollars integer quarters integer dimes integer nickels integer penny integer dollar integer dime integer nickel integer quarter penny = 1 pennies = 2 dollar = 1 dollars = 2 quarter = 1 quarters = 2 dime =  1 dimes = 2 nickel = 1 nickel = 2 money = Get next input if money <= 0    Put "No change" to output   nickels = money / 5 if nickels > 0 and money > 0    money = money - (nickels * 5) if nickels == 1    Put "nickel\n" to output elseif nickels > 1    Put "nickels\n" to output    pennies = money / 1 if pennies > 0 and money > 0    money = money - (pennies * 1) if pennies == 1    Put "penny\n" to output elseif pennies > 1    Put "pennies\n" to output dimes = money / 10 if dimes > 0 and money > 0     money = money - (dimes * 10) if dimes == 1    Put "dime\n" to output elseif dimes > 1    Put "dimes\n" to output  quarters = money / 25 if quarters > 0 and money > 0    money = money - (quarters * 25) if quarters == 1    Put "quarter\n" to output elseif quarters > 1    Put "quarter\n" to output  dollars = money / 100 if dollars > 0 and money > 0    money = money - (dollars * 100) if dollars == 1    Put "dollar\n" to output elseif dollars > 1    Put "dollars\n" to output

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Hi, I have an issue with this coding assigment... I have already done everything possible to make it good but I am not getting the output that I should get. 

 

This is what I have done so far but I'm yielding different results. The assignment is supposed to be in Coral Programming form. 

 

integer money
integer pennies
integer dollars
integer quarters
integer dimes
integer nickels
integer penny
integer dollar
integer dime
integer nickel
integer quarter

penny = 1
pennies = 2
dollar = 1
dollars = 2
quarter = 1
quarters = 2
dime =  1
dimes = 2
nickel = 1
nickel = 2

money = Get next input
if money <= 0
   Put "No change" to output

 

nickels = money / 5
if nickels > 0 and money > 0
   money = money - (nickels * 5)
if nickels == 1
   Put "nickel\n" to output
elseif nickels > 1
   Put "nickels\n" to output 

 

pennies = money / 1
if pennies > 0 and money > 0
   money = money - (pennies * 1)
if pennies == 1
   Put "penny\n" to output
elseif pennies > 1
   Put "pennies\n" to output

dimes = money / 10
if dimes > 0 and money > 0 
   money = money - (dimes * 10)
if dimes == 1
   Put "dime\n" to output
elseif dimes > 1
   Put "dimes\n" to output 

quarters = money / 25
if quarters > 0 and money > 0
   money = money - (quarters * 25)
if quarters == 1
   Put "quarter\n" to output
elseif quarters > 1
   Put "quarter\n" to output 

dollars = money / 100
if dollars > 0 and money > 0
   money = money - (dollars * 100)
if dollars == 1
   Put "dollar\n" to output
elseif dollars > 1
   Put "dollars\n" to output 

=zyBooks My library > CTI 110: Web Programming and Database Foundation home > 12.2: Final LAB: Exact change
Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. End
each line with a newline. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as
appropriate, like 1 penny vs. 2 pennies.
Ex: If the input is:
0
or less than 0, the output is:
no change
Ex: If the input is:
45
the output is:
1 quarter
2 dimes
See the Flowchart for help
397564.2697036.qx3zqy7
LAB
ACTIVITY
12.2.1: Final LAB: Exact change
integer money
integer pennies
integer dollars
integer quarters
integer dimes
integer nickels
integer penny
integer dollar
integer dime
integer nickel
integer quarter
Variables
Not shown when editing
EzyBooks catalog ? Help/FAQ Oriana Alexander
Input
0 45
0/10
Load default template...
Transcribed Image Text:=zyBooks My library > CTI 110: Web Programming and Database Foundation home > 12.2: Final LAB: Exact change Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. End each line with a newline. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies. Ex: If the input is: 0 or less than 0, the output is: no change Ex: If the input is: 45 the output is: 1 quarter 2 dimes See the Flowchart for help 397564.2697036.qx3zqy7 LAB ACTIVITY 12.2.1: Final LAB: Exact change integer money integer pennies integer dollars integer quarters integer dimes integer nickels integer penny integer dollar integer dime integer nickel integer quarter Variables Not shown when editing EzyBooks catalog ? Help/FAQ Oriana Alexander Input 0 45 0/10 Load default template...
Expert Solution
steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education