Question: Write code for a program in c++ preferably in visual studio 2008 or 2015 that takes an input of any number up to 2 billion
Write code for a program in c++ preferably in visual studio 2008 or 2015 that takes an input of any number up to 2 billion and converts the number into its equivalent string word. For instance the number 1 equals ONE when typed inby user all the way to 2,000,000,000 = TWO BILLION take account of numbers like 11 = eleven, twelve = 12, 112 = ONE HUNDRED AND TWELVE. Also take account for the decimals place and commas. It works - for all numbers between 0 and 2 billion , for all positive, signed integers. Each function should be small, single-purposed, and readable. You should have decomposed the problem using the repeating three-digit pattern. You really really should havea function string threeDigitsToWrittenStr ( int onesTensHundreds ) Your names don't need to be my suggestions... but should be readable, convey meaning, and make your design more understandable. Your main function should have explicit tests for boundaries of interest: 0-31, all decades, 99-119, all hundreds, 999-1019, 9999-10019, 99999-100019, 999999-1000019, up to the maximum. You should have a basic input loop using cin >> double, and have begun working on the input/floating point.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
