Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Help With Change

Help With Change

Scheduled Pinned Locked Moved Managed C++/CLI
c++saleshelptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    klutez123
    wrote on last edited by
    #1

    Hi I need to make a program where you get the price of an item and you get the change needed back. And then it needs to show the bills and cents given back to the customer. such as Twenties: 2 Tens: 1 Fives: 1 Singles: 4 Quarters: Dimes: Nickles: Pennies: The only part I don't know how to do the output of the 20's and such, i understand everything before it. Please help Thanks (written in C++) Also if you have extra time what is an up to date program to use for C++ code and how much/where can i get it Kevin -- modified at 17:11 Sunday 19th March, 2006

    D 1 Reply Last reply
    0
    • K klutez123

      Hi I need to make a program where you get the price of an item and you get the change needed back. And then it needs to show the bills and cents given back to the customer. such as Twenties: 2 Tens: 1 Fives: 1 Singles: 4 Quarters: Dimes: Nickles: Pennies: The only part I don't know how to do the output of the 20's and such, i understand everything before it. Please help Thanks (written in C++) Also if you have extra time what is an up to date program to use for C++ code and how much/where can i get it Kevin -- modified at 17:11 Sunday 19th March, 2006

      D Offline
      D Offline
      Douglas Dean
      wrote on last edited by
      #2

      get the price in pennies format (total number of pennies) as an int. nickels = pennies/5 pennies %= 5 quarters = nickels/5 nickels %= 5 dimes = nickels/2 nickels %= 2 singles = quarters/4 quarters %= 4 fives = singles/5 singles %= 5 tens = fives/2 fives %= 2 twenties = tens/2 tens %= 2

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups