part 1
find the most efficient way of making change for any amount of money up to $200.00. the most efficient way means the fewer pieces of currency. the following are the values of monies to use.
$ 100.00 $1.00
$ 50.00 $.50
$20.00 $.25
$10.00 $.10
$5.00 $.05
$2.00 $.01
for example, if i were to give you change of $8.93, the most efficient would be 1-$5.00, 1-$2.00, 1-$1.00, 1-$.50, 1-$.25, 1-$.10, 1- $.05, 3- $.01. only tell me the change i will get, not what i will not get.
part 2
if the amount of the change is $10.00 or less, i want you to tell me the number of different ways you could have made change for that amount. for example, if the my change was $.25, you give me a quarter, but tell me that there are 13 different ways you could have made change ( or if any change was $0.50, you would give me a hal-dollar and tell me there are 50 ways you could have made change). run the program to show the result for $10.00 = $5.00 - $4.00 - $3.00 - $2.00 - $1.00 - $.50 - $0.25 - $0.10.
#include "stdafx.h"
#include <iostream>
using std:cout;
using std:cin;
int hundredD;
int fiftyD;
int twentyD;
int tenD;
int fiveD;
int twoD;
int oneD;
int fiftyC;
int quarter;
int dime;
int nickle;
int penny;
double change; // Whatever this is.
hundredD = change / 100;
change = change % hundred;
fiftyD = change / 50;
change = change % 50;
twentyD = change / 20;
change = change % 20;
tenD = change / 10;
change = change % 10;
fiveD = change / 5;
change = change % 5;
twoD = change/ 2;
change = change % 2;
oneD = change / 1;
change = change %1;
fiftyC = change / 0.50;
change = change % 0.50;
quarter = change / 0.25;
change = change %0.25;
dime = change / 0.10;
change = change % 0.10;
nickle = change / 0.05;
change = change % 0.05;
penny = change / 0.01;
change = change % 0.01
I am confuse, what do you do next. Can someone please please explain this to me?