GonzoReal's comments

  GonzoReal   ignore (0)   2017 Jun 13, 12:18am   ↑ like (1)   ↓ dislike (1)   quote   flag        

Dusk at Squaw June 11

  GonzoReal   ignore (0)   2017 Jul 27, 8:06pm   ↑ like (2)   ↓ dislike (0)   quote   flag        

Pseudocoded without arrays or loops using mod function. Not very elegant but time complexity is constant for any input.

amount = 0

Input amount from user
amount =amount X 100;. Get rid of decimals
remainder = amount mod 25
amount = amount - remainder
quarters = amount /25
amount = remainder
remainder = amount mod 10
amount = amount - remainder
dimes = amount / 10
amount = remainder
remainder = amount mod 5
amount =amount - remainder
nickels = amount / 5
pennies = remainder
output "Quarters =" quarters
output "Dimes =" dimes
output "Nickels =" nickels
output "Pennies =" pennies

The Housing Trap
You're being set up to spend your life paying off a debt you don't need to take on, for a house that costs far more than it should. The conspirators are all around you, smiling to lure you in, carefully choosing their words and watching your reactions as they push your buttons, anxiously waiting for the moment when you sign the papers that will trap you and guarantee their payoff. Don't be just another victim of the housing market. Use this book to defend your freedom and defeat their schemes. You can win the game, but first you have to learn how to play it.
115 pages, $12.50

Kindle version available

about   best comments   contact   one year ago   suggestions