write a program that takes a three digit/two digit/one digit number as an input and displays the number in words

2 Years
Discussion Span
Last Post by davidnelson4911

Please find attached the solution:

int main()
  int number;
  cin>> number;

  cout<<"the number in words";

  return 0;

Note: not compiled or tested!

Votes + Comments
I wish I cold vote more than once on this.

You need to start with a skeleton of a program that will compile/run.

Then you need to add the ability prompt for, and read/store a number.

Then, you need to break that number into its component parts.

Then, with those component parts you need to determine what the textual equivalent would be(a premade array with the numbers associated with the index dows nicely here).

After you have determined the textual equivalent, you need to print it and exit.

That is all it would be reasonable for me to offer you as help right now...

HOWEVER: If you write some code, and give it an Honest effort at solving it, and you still have an issue. Then you can come back and post the code, along with a short description of the problem. And I will be more than happy to help you out.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.