June 27th, 2013, 07:53 PM
For this program, a two digit number will be provided, and the English word for the number will be displayed. I am trying to use switch statements for this. For example, one switch statement will be used for naming the first digit (twenty, seventy, etc) and another will be used for naming the second digit (one, five, etc). But I am not quite sure what to do with the numbers from 11-19. Any suggestions would be helpful. Thanks in advance :)
June 28th, 2013, 08:59 PM
If you are using a switch statment for the first digit i.e. twenty, thirty... then you could use another switch statment inside the case for 1 i.e. 10 and use this switch for 10-19. So then in total you should have 3 switch statments. I dont know if that would be the most elegent solution for the problem but its only using switches.
June 28th, 2013, 09:16 PM
Okay, I'll be trying it out after a while. Thanks for your help :)
Originally Posted by KaiUR