Like Tree4Likes
  • 4 Post By jimblumberg

solution:jumping into c++ chapter 7 exercise 1 (turn numbers into English text)

This is a discussion on solution:jumping into c++ chapter 7 exercise 1 (turn numbers into English text) within the C++ Programming forums, part of the General Programming Boards category; Hi,everyone I'm tring to solve this problem ,but i have no idea how to break the number up into chunks ...

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    11

    Question solution:jumping into c++ chapter 7 exercise 1 (turn numbers into English text)

    Hi,everyone
    I'm tring to solve this problem ,but i have no idea how to break the number up into chunks of 3 digits and compute the text of a three digit chunk……Just help me! Thanks!

  2. #2
    Registered User
    Join Date
    Aug 2012
    Posts
    11
    who can help me ?
    "Imagine trying to come up with an algorithm for a program that displayed the English
    name for a number (example: 1204, one thousand, two hundred four). "
    How to work it out?

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,269
    Quote Originally Posted by just_rookie
    "Imagine trying to come up with an algorithm for a program that displayed the English
    name for a number (example: 1204, one thousand, two hundred four). "
    How to work it out?
    Start with non-negative numbers less ten, then expand it to work with numbers less than a hundred, then numbers less than a thousand.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Registered User
    Join Date
    Aug 2012
    Posts
    11
    Thank you! Please post your code ,and i think i will learn something form your code !Thank you again!

  5. #5
    Registered User
    Join Date
    Aug 2012
    Posts
    11
    Quote Originally Posted by laserlight View Post
    Start with non-negative numbers less ten, then expand it to work with numbers less than a hundred, then numbers less than a thousand.
    Thank you! Please post your code ,and i think i will learn something form your code !Thank you again!

  6. #6
    Registered User
    Join Date
    May 2010
    Posts
    2,917
    How about you posting your code where you are trying to solve your problem. You will learn much more by writing the code yourself than by "looking" at someone else's code. If you don't understand something then ask specific questions. Hopefully if the book is giving you a problem to solve it has already explained the basics of solving the problem.

    Jim

  7. #7
    Registered User
    Join Date
    Aug 2012
    Posts
    11
    Quote Originally Posted by jimblumberg View Post
    How about you posting your code where you are trying to solve your problem. You will learn much more by writing the code yourself than by "looking" at someone else's code. If you don't understand something then ask specific questions. Hopefully if the book is giving you a problem to solve it has already explained the basics of solving the problem.

    Jim
    Thank you very much!You taught me a very important lesson!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 04-02-2012, 06:42 AM
  2. Jumping into C++ Chapter 5 problem 6 - Critique please
    By Kranky in forum C++ Programming
    Replies: 8
    Last Post: 03-07-2012, 05:44 PM
  3. Replies: 2
    Last Post: 02-16-2012, 03:03 PM
  4. Request for feedback -- exercise solution.
    By msh in forum C Programming
    Replies: 4
    Last Post: 07-07-2010, 01:48 PM
  5. C++ program help(converting numbers to english words)
    By bama1 in forum C++ Programming
    Replies: 4
    Last Post: 10-08-2002, 02:17 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21