### Help with deleting lines

I am writing a program that gives you the least amount of change when you type in a number. It is sort of a change calculator. What the program currently does is give out the correct change but for the unused coins it shows and output of 0. What I want it to show is just the used coins and the unused ones to not show up. I'm told that this can be achieved with IF statements but I have not learned how to fully use them to do this.

Here is my code:

 ``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465`` ``````#include using namespace std; const int FIFTIES = 5000; const int TWENTIES = 2000; const int TENS = 1000; const int FIVES = 500; const int TWOS = 200; const int ONES = 100; const int QUARTER = 25; const int DIME = 10; const int NICKEL = 5; const int PENNIES_TO_DOLLAR = 100; int main() { int DollarAmt, DecimalAmt; char DecimalPoint; int TotalMoneyInPennies; cout<<"This program will convert a total amount of money into denominations of money to make change."<> DollarAmt >> DecimalPoint >> DecimalAmt; cout<
 ``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374`` ``````#include using namespace std; int main() { const int FIFTIES = 5000; const int TWENTIES = 2000; const int TENS = 1000; const int FIVES = 500; const int TWOS = 200; const int ONES = 100; const int QUARTER = 25; const int DIME = 10; const int NICKEL = 5; const int PENNIES_TO_DOLLAR = 100; float DollarAmt; int TotalMoneyInPennies; cout<<"This program will convert a total amount of money into denominations of money to make change."<> DollarAmt; cin.ignore(); cout<

Don't use `system();` . It's a security hazard and uses extra memory.
Thank you this works flawlessly
I need C++ program of calculator that solve such an expression
10*(24/(5-2))+13
Topic archived. No new replies allowed.