|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Summer Labview Challenge 2
The challenge is to create a change machine
Part 1 You have an item that cost X and you are given X amount of money. The program will need to give back the correct amount and least amount of dollars and coins Example: You have a basketball that cost $10.23 and they give you $20. You will need to give them back 1 five dollar bill, 4 one dollar bills, 3 quarts, 2 pennies Inputs: 1) Cost of Item 2) Amount Paid Outputs: 1) Number of $20 2) Number of $10 3) Number of $5 4) Number of $1 5) Number of Quarters 6) Number of Dimes 7) Number of Nickels 8) Number of Pennies Part 2: Same as above but you only have a limited number of each denomination however you still need to give the correct amount of change. If you cannot give back the correct amount you will need to give a fault and notify the clerk Example: You have a basketball that cost $10.23 and they give you $20. However you only have 2 quarters. You will need to give them back 1 five dollar bill, 4 one dollar bills, 2 quarts, 2 dimes, 1 nickel and 2 pennies Inputs: 1) Cost of Item 2) Amount Paid 3) Amount of $20 4) Amount of $10 5) Amount of $5 6) Amount of $1 7) Amount of Quarters 8) Amount of Dimes 9) Amount of Nickels 10) Amount of Pennies Outputs: 1) Number of $20 2) Number of $10 3) Number of $5 4) Number of $1 5) Number of Quarters 6) Number of Dimes 7) Number of Nickels 8) Number of Pennies 9) Cannot give back the correct change If you have any questions please feel free to ask them and post your result on here. Thanks |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|