title: Write code to convert given number into words (eg 1234 as input should output one thousand two hundred and thirty four)
body: <p>Write C/C++/Java code to convert given number into words.</p>
  
  <p>eg:-
  Input:
  1234</p>
  
  <p>Output:
  One thousand two hundred thirty-four.</p>
  
  <p>Input:
  10</p>
  
  <p>Output:
  Ten</p>
  
  <p>Does it require a complete switch case for digits 0 to 10.</p>
  
  <p>Adding "teen" after every number name (eg: 14: four "teen".) from 14 to 19.</p>
  
  <p>And than adding "ty" and the digits name for a number in the range 20 to 99.</p>
  
  <p>And so on. </p>
  
  <p>I think there must be some far better approach for solving this.</p>
  
  <p>C code is preferred.</p>